public function getTemplates($force = false)
    {
        if ($this->nb_messaging_template_list === null) {
            $this->nb_messaging_template_list = new CNabuMessagingTemplateList();
        }

        if ($this->nb_messaging_template_list->isEmpty() || $force) {
            $this->nb_messaging_template_list->clear();
            $this->nb_messaging_template_list->merge(CNabuMessagingTemplate::getAllMessagingTemplates($this));
            $this->nb_messaging_template_list->iterate(function($key, CNabuMessagingTemplate $nb_template) {
                $nb_template->setMessaging($this);
                return true;
            });
        }

        return $this->nb_messaging_template_list;
    }
public function getTemplates($force = false)
    {
        if ($this->nb_messaging_template_list === null) {
            $this->nb_messaging_template_list = new CNabuMessagingTemplateList();
        }

        if ($this->nb_messaging_template_list->isEmpty() || $force) {
            $this->nb_messaging_template_list->clear();
            $this->nb_messaging_template_list->merge(CNabuMessagingTemplate::getAllMessagingTemplates($this));
            $this->nb_messaging_template_list->iterate(function($key, CNabuMessagingTemplate $nb_template) {
                $nb_template->setMessaging($this);
                return true;
            });
        }

        return $this->nb_messaging_template_list;
    }
public function getTemplates ( $ force = false ) { if ( $ this -> nb_messaging_template_list === null ) { $ this -> nb_messaging_template_list = new CNabuMessagingTemplateList ( ) ; } if ( $ this -> nb_messaging_template_list -> isEmpty ( ) || $ force ) { $ this -> nb_messaging_template_list -> clear ( ) ; $ this -> nb_messaging_template_list -> merge ( CNabuMessagingTemplate :: getAllMessagingTemplates ( $ this ) ) ; $ this -> nb_messaging_template_list -> iterate ( function ( $ key , CNabuMessagingTemplate $ nb_template ) { $ nb_template -> setMessaging ( $ this ) ; return true ; } ) ; } return $ this -> nb_messaging_template_list ; }
Get Templates assigned to this Messaging instance.
@param bool $force If true, the Messaging Template List is refreshed from the database.
@return CNabuMessagingTemplateList Returns the list of Templates. If noe Template exists, the list is empty.
Get Templates assigned to this Messaging instance .