A class to manage template types
package |
CMS |
---|---|
license |
GPL |
since | 2.0 |
author |
Robert Campbell calguy1000@gmail.com |
get_id() : integer
integer
type id, or null if this record has no id.
get_originator(boolean $viewable = FALSE) : string
boolean
$viewableShould the originator name be the viewable (friendly) string?
string
set_originator(string $str)
string
$strThe originator string, usually a module name.
get_name() : string
string
the template type
set_name(\sting $str)
\sting
$strThe template type name.
get_dflt_flag() : boolean
boolean
set_dflt_flag(boolean $flag = TRUE)
boolean
$flagget_dflt_contents() : string
string
set_dflt_contents(string $str)
string
$strThe default template contents.
get_description() : string
string
set_description(string $str)
string
$strThe default template contents.
get_owner() : integer
integer
set_owner(integer $owner)
integer
$ownerget_create_date() : \intUnix
\intUnix
timestamp representing the creation date. or null if this object has not been saved.
get_modified_date() : \intUnix
\intUnix
timestamp representing the modification date. or null if this object has not been saved.
set_lang_callback(callable $data)
This callback must be a static string representing a static function name, or an array representing a class name and method name. This callback (if set) will be used to translate the originator string, and the name string to something suitable to users language.
callable
$dataA static function name string, or an array of class name and member name.
get_lang_callback() : mixed
mixed
set_help_callback(callable $callback)
callable
$callbackA static function name, or an array of a class name and member name.
get_help_callback() : mixed
mixed
set_oneonly_flag(boolean $flag = TRUE)
boolean
$flagget_oneonly_flag() : boolean
boolean
set_content_callback(callable $data)
Modules typically distribut sample templates. This callback function is used when the user clicks on a button to reset the selected template type to it's factory default values.
callable
$dataA static function name string, or an array of class name and member name.
get_content_callback() : mixed
mixed
get_content_block_flag() : boolean
boolean
set_content_block_flag(boolean $flag)
boolean
$flagvalidate(boolean $is_insert = TRUE)
This method will check the contents of the object for validity, and ensure that the originator/name combination are unique.
This method throws an exception if an error is found in the integrity of the object.
boolean
$is_insertWether this is a new insert, or an update.
_insert()
This method will ensure that the current object is valid, generate an id, and insert the record into the database. An exception will be thrown if errors occur.
_update()
This method will ensure that the current object is valid, generate an id, and update the record in the database. An exception will be thrown if errors occur.
save()
get_template_list() : Array
Array
of CmsLayoutTemplate objects. or null.
delete()
create_new_template(string $name = '') : \CmsLayoutTemplate
This method will throw an exception if the template cannot be created.
string
$nameThe template name
object, or null.
get_dflt_template() : \CmsLayoutTemplate
This method will throw an exception if the template cannot be created.
object, or null.
get_template_helptext()
get_langified_display_value()
reset_content_to_factory()
load(mixed $val) : \CmsLayoutTemplateType
This method throws an exception when the requested object cannot be found.
mixed
$valAn integer template type id, or a string in the form of Originator::Name
load_all_by_originator(string $originator) : array
This method will throw exceptions if an error is encounted.
string
$originatorThe origiator name
array
An array of CmsLayoutTemplateType objects, or null if no matches are found.
get_all() : array
array
Array of CmsLayoutTemplateType objects
load_bulk(array<mixed,integer> $list)
array<mixed,integer>
$listArray of template type ids
get_loaded_types() : array
array
Associative array of loaded type objects.
get_assistant() : \CMSMS\Layout\TemplateTypeAssistant
get_usage_string(string $name) : string
string
$nameThe name of the template object.
string
CORE