A class to represent a smarty template.
package |
CMS |
---|---|
license |
GPL |
since | 2.0 |
author |
Robert Campbell calguy1000@gmail.com |
get_id() : integer
integer
get_name() : string
string
set_name(string $str)
The template name cannot be empty, can only consist of a few characters in the name and must be unique
string
$strget_content() : string
string
set_content(string $str)
string
$strSmarty template text
get_description() : string
string
set_description(string $str)
string
$strget_type_id() : integer
integer
set_type(mixed $a)
mixed
$aEither an instance of CmsLayoutTemplateType object, an integer type id, or a string template type identifier
get_type_dflt() : boolean
boolean
set_type_dflt(boolean $flag)
boolean
$flagget_category_id()
get_category()
set_category(mixed $a)
mixed
$aEither a CmsLayoutTemplateCategory object, a category name (string) or category id (int)
get_designs() : array
array
Array of integers
set_designs(array $x)
array
$xArray of integers.
add_design(mixed $a)
mixed
$aA CmsLayoutCollection object, an integer design id, or a string design name.
remove_design(mixed $a)
mixed
$aA CmsLayoutCollection object, an integer design id, or a string design name.
get_owner_id() : integer
integer
set_owner(mixed $a)
mixed
$aAn integer admin user id, a string admin username, or an instance of a User object
get_created() : integer
integer
get_modified() : integer
integer
get_additional_editors() : array
array
Array of integer user ids
set_additional_editors(mixed $a)
mixed
$aAccepts an array of strings (usernames) or an array of integers (user ids, and negative group ids)
can_edit(mixed $a) : boolean
mixed
$aEither a username (string) or an integer user id.
boolean
get_listable() : boolean
boolean
is_listable() : boolean
boolean
set_listable(boolean $flag) : boolean
boolean
$flagThe value for the listable attribute.
boolean
process() : string
string
validate()
save()
delete()
get_lock()
locked() : boolean
boolean
lock_expired() : \booln
\booln
load_bulk(array<mixed,integer> $list, boolean $deep = true) : array
array<mixed,integer>
$listArray of integer template ids
boolean
$deepOptionally load attached data.
array
Array of CmsLayoutTemplate objects
load(mixed $a) : \CmsLayoutTemplate
mixed
$aEither an integer template id, or a template name (string)
get_owned_templates(mixed $a) : array
mixed
$aAn integer user id, or a string user name
array
Array of integer template ids
template_query(array $params)
array
$paramsget_editable_templates(mixed $a)
mixed
$aAn integer userid or a string username
user_can_edit(mixed $tpl, mixed $userid = null) : boolean
mixed
$tplAn integer template id, or a string template name
mixed
$useridAn integer user id, or a string user name. If no userid is specified the currently logged in userid is used
boolean
create_by_type(mixed $t) : \CmsLayoutTemplate
mixed
$tA CmsLayoutTemplateType object, An integer template type id, or a string template type identifier
load_dflt_by_type(mixed $t) : \CmsLayoutTemplate
mixed
$tA CmsLayoutTemplateType object, An integer template type id, or a string template type identifier
load_all_by_type(\CmsLayoutTemplateType $type) : array
process_by_name(string $name) : string
string
$name string
process_dflt(mixed $t) : string
mixed
$tA CmsLayoutTemplateType object, An integer template type id, or a string template type identifier
string
get_loaded_templates() : array
array
Array of integer template ids
generate_unique_name(string $prototype, string $prefix = null)
string
$prototypeA prototype template name
string
$prefixAn optional name prefix.
get_type() : \CmsLayoutTemplateType
get_usage_string() : string
string
A sample usage string for this template.
get_content_filename() : string
string
has_content_file() : boolean
boolean