public function getTemplateByKey(string $key)
    {
        $retval = false;

        if (is_string($key) && strlen($key) > 0) {
            $this->getTemplates();
            $retval = $this->nb_messaging_template_list->getItem($key, CNabuMessagingTemplateList::INDEX_KEY);
        }

        return $retval;
    }
public function getTemplateByKey(string $key)
    {
        $retval = false;

        if (is_string($key) && strlen($key) > 0) {
            $this->getTemplates();
            $retval = $this->nb_messaging_template_list->getItem($key, CNabuMessagingTemplateList::INDEX_KEY);
        }

        return $retval;
    }
public function getTemplateByKey ( string $ key ) { $ retval = false ; if ( is_string ( $ key ) && strlen ( $ key ) > 0 ) { $ this -> getTemplates ( ) ; $ retval = $ this -> nb_messaging_template_list -> getItem ( $ key , CNabuMessagingTemplateList :: INDEX_KEY ) ; } return $ retval ; }
Gets a Template by Key.
@param string $key A string Key representing the Template as defined in the database storage.
@return CNabuMessagingTemplate|bool Returns the Messaging Template instance if exists or false if not.
Gets a Template by Key .