Documentation

Site_Model extends Core_Entity
in package

Site_Model

Tags
subpackage

Site

version
7.x
author

Hostmake LLC

copyright

© 2005-2024 ООО "Хостмэйк" (Hostmake LLC), http://www.hostcms.ru

Table of Contents

Properties

$config  : mixed
ORM config
$domains  : int
Backend property
$img  : int
Backend property
$rollback  : mixed
Backend property
$_allowedTags  : array<string|int, mixed>
Allowed tags. If list of tags is empty, all tags will show.
$_attributes  : array<string|int, mixed>
Entity Attributes
$_belongsTo  : array<string|int, mixed>
Belongs to relations
$_changeCopiedName  : bool
Change copied name is necessary, default FALSE
$_changedColumns  : array<string|int, mixed>
List of changed columns
$_currentAlias  : Site_Alias_Model
Current alias
$_dataValues  : array<string|int, mixed>
data-values, e.g. dataMyValue
$_forbiddenTags  : array<string|int, mixed>
Forbidden tags. If list of tags is empty, all tags will show.
$_hasMany  : array<string|int, mixed>
One-to-many or many-to-many relations
$_hasOne  : array<string|int, mixed>
One-to-one relations
$_hasRevisions  : mixed
Has revisions
$_marksDeleted  : mixed
Marks deleted entity
$_modelColumns  : array<string|int, mixed>
List of columns in model with values
$_modelName  : mixed
Model name, e.g. 'book' for 'Book_Model'
$_nameColumn  : string
Column consist item's name
$_preloadValues  : array<string|int, mixed>
List of preloaded values
$_primaryKey  : string
Primary key
$_queryBuilder  : Core_QueryBuilder_Select
Select query builder
$_shortcodeTags  : array<string|int, mixed>
List of Shortcodes tags
$_showXmlAlias  : bool
Show alias data in XML
$_showXmlSiteuserIdentityProviders  : bool
Show identity providers data in XML
$_skipColumns  : array<string|int, mixed>
List of skipped columns from table
$_sorting  : array<string|int, mixed>
Default sorting for models
$_tableColumns  : array<string|int, mixed>
List of columns in table
$_tableName  : mixed
Table name, e.g. 'books' for 'Book_Model'
$_typicalForbiddenTags  : array<string|int, mixed>
Typical forbidden tags.

Methods

__call()  : mixed
Triggered when invoking inaccessible methods in an object context
__construct()  : mixed
Constructor.
add()  : self
Add related object. If main object does not save, it will save.
addAllowedTag()  : self
Add tag to allowed tags list
addAllowedTags()  : self
Add tags to allowed tags list
addAttribute()  : self
Add entity attribute
addEntities()  : self
Add children entities
addEntity()  : self
Add a children entity
addForbiddenTag()  : self
Add tag to forbidden tags list
addForbiddenTags()  : self
Add tags to forbidden tags list
addXmlTag()  : self
Add external tag for entity
applyMarksDeleted()  : self
Apply markDeleted flag if is set
backupRevision()  : self
Backup revision
changeCopiedName()  : self
Set if change copied name is necessary
changed()  : bool
Check model has been changed.
changeStatus()  : self
Change status of activity for site
check()  : self
Check model values. If model has incorrect value, one will correct or call exception.
chunk()  : bool
Retrieve a small chunk and feeds each one into $callback for processing. It stops looping when $callback returns FALSE
clear()  : self
Clear object
clearEntities()  : self
Clear enities
clearEntitiesAfterGetXml()  : self
Clear all entities after XML generation
clearXmlTags()  : mixed
Clear external XML tags for entity.
copy()  : Core_Entity
Copy object
create()  : self
Insert new object data into database
delete()  : Core_Entity
Delete object from database
deleteAll()  : self
Delete all object
deleteFavicon()  : self
Delete favicon file
factory()  : mixed
Create and return an object of model
find()  : self
Find object in database and load one. Use clear() before find() with conditions!
findAll()  : array<string|int, mixed>
Find all objects
getAllowedTags()  : array<string|int, mixed>
Get allowed tags list
getByAlias()  : Site_Alias_Model|null
Get alias by name
getChangedData()  : array<string|int, mixed>
Get changed columns with values
getClassName()  : string
Get Model CallsName
getCount()  : int|false
Get count object
getCurrentAlias()  : Site_Alias_Model|null
Get current alias
getDatabaseDriver()  : string
Get name of Database Driver
getDataValues()  : array<string|int, mixed>
Get dataValues
getEntities()  : array<string|int, mixed>
Get children entities
getErrorEmail()  : string
Get first error email
getFaviconHref()  : string
Get favicon file href
getFaviconPath()  : string
Get favicon file path
getFieldIDs()  : array<string|int, mixed>
Get visible field's IDs
getFields()  : array<string|int, mixed>
Get field's values
getFirst()  : null|Core_ORM
Get fist entity, ordered by primary key
getFirstEmail()  : string
Get first email
getFirstSite()  : Site_Model|null
Get first site
getForbiddenTags()  : array<string|int, mixed>
Get forbidden tags list
getKeys()  : array<string|int, mixed>
Get site keys as array
getLast()  : null|Core_ORM
Get last entity, ordered by primary key
getMarksDeleted()  : string
Get column name for marks deleted
getModelName()  : string
Get model name, e.g. 'book' for 'Book_Model'
getName()  : string
Get entity name
getNameColumn()  : string
Get Name Column
getPrimaryKey()  : mixed
Get primary key value
getPrimaryKeyName()  : string
Get primary key name
getRelatedSite()  : Site_Model|null
Get Related Site
getRelations()  : array<string|int, mixed>
Get $this->_relations
getStdObject()  : stdObject
Get stdObject for entity and children entities
getTableColumns()  : array<string|int, mixed>
Get tableColumns
getTableColums()  : array<string|int, mixed>
Get table columns. Fix wrong method name
getTableName()  : string
Get table name
getTrashDescription()  : string
Get entity description
getXml()  : string
Get XML for entity and children entities
getXmlTagName()  : string
Get tag name
getXmlTags()  : array<string|int, mixed>
Get external XML tags for entity.
imgBackend()  : mixed
isCallable()  : bool
Verify that the contents of a variable can be called as a function
isEmptyPrimaryKey()  : bool
Check is primary key NULL
markDeleted()  : self
Mark entity as deleted
nameBadge()  : string
Backend badge
queryBuilder()  : Core_QueryBuilder_Select
Get query builder for select
remove()  : self
Remove related object. If main object does not save, it will save.
removeAllowedTag()  : self
Remove tag from allowed tags list
removeForbiddenTag()  : self
Remove tag from forbidden tags list
rollbackRevision()  : self
Rollback Revision
save()  : Core_Entity
Save object.
saveFavicon()  : self
Specify favicon file
setCheck()  : self
Set _check flag
setDatabaseDriver()  : mixed
Set name of Database Driver
setMarksDeleted()  : self
Set column name for marks deleted
setRelations()  : self
Set $this->_relations
setXmlTagName()  : self
Set name of XML node
showXmlAlias()  : self
Show alias in XML
showXmlSiteuserIdentityProviders()  : self
Show identity providers in XML
timezoneBackend()  : mixed
toArray()  : array<string|int, mixed>
Convert Object to Array
undelete()  : self
Turn off deleted status
update()  : self
Update object data into database
uriSatisfyRequirements()  : mixed
Check if $uri satisfy $requirements
_getCopiedName()  : mixed
Get the name of a new copied object
_getFaviconPath()  : mixed
Get favicon path
_isTagAvailable()  : bool
Is $tagName Available
_prepareData()  : self
Prepare entity and children entities
getDatabase()  : Core_DataBase
Get Database

Properties

$config

ORM config

public static mixed $config = \NULL

$domains

Backend property

public int $domains = 1

$img

Backend property

public int $img = 1

$rollback

Backend property

public mixed $rollback = 0

$_allowedTags

Allowed tags. If list of tags is empty, all tags will show.

protected array<string|int, mixed> $_allowedTags = array()

$_attributes

Entity Attributes

protected array<string|int, mixed> $_attributes = array()

$_belongsTo

Belongs to relations

protected array<string|int, mixed> $_belongsTo = array('user' => array())

$_changeCopiedName

Change copied name is necessary, default FALSE

protected bool $_changeCopiedName = \FALSE

$_changedColumns

List of changed columns

protected array<string|int, mixed> $_changedColumns = array()

$_dataValues

data-values, e.g. dataMyValue

protected array<string|int, mixed> $_dataValues = array()

$_forbiddenTags

Forbidden tags. If list of tags is empty, all tags will show.

protected array<string|int, mixed> $_forbiddenTags = array('deleted', 'user_id', 'robots', 'key', 'error', 'error404', 'error403', 'closed', 'safe_email', 'css_left', 'css_right', 'notes', 'uploaddir', 'nesting_level', 'html_cache_use', 'html_cache_with', 'html_cache_without', 'html_cache_clear_probability')

$_hasMany

One-to-many or many-to-many relations

protected array<string|int, mixed> $_hasMany = array( 'affiliate_plan' => array(), 'advertisement' => array(), 'advertisement_group' => array(), 'benchmark' => array(), 'cloud' => array(), 'company_department_action_access' => array(), 'company_department_module' => array(), 'company_site' => array(), 'company' => array('through' => 'company_site'), 'counter' => array(), 'counter_browser' => array(), 'counter_device' => array(), 'counter_display' => array(), 'counter_os' => array(), 'counter_page' => array(), 'counter_referrer' => array(), 'counter_searchquery' => array(), 'counter_session' => array(), 'counter_useragent' => array(), 'counter_visit' => array(), 'cdn_site' => array(), 'chartaccount_cashflow' => array(), 'deal' => array(), 'deal_template' => array(), 'document' => array(), 'document_dir' => array(), 'document_status' => array(), 'dms_document' => array(), 'dms_class' => array(), 'dms_case_archive' => array(), 'dms_case_destruction' => array(), 'dms_communication' => array(), //'dms_field' => array(), 'dms_field_dir' => array(), 'dms_state' => array(), 'dms_template_instruction_dir' => array(), 'dms_template_instruction' => array(), 'dms_participant' => array(), 'dms_workflow_template_dir' => array(), 'dms_workflow_template' => array(), 'dms_workflow' => array(), 'dms_workflow' => array(), 'dms_document_transfer' => array(), 'dms_document_checkpoint' => array(), 'field' => array(), 'form' => array(), 'forum' => array(), 'helpdesk' => array(), 'informationsystem' => array(), 'informationsystem_dir' => array(), 'lead' => array(), 'lead_need' => array(), 'lead_maturity' => array(), 'lead_status' => array(), 'list' => array(), 'list_dir' => array(), 'maillist' => array(), 'media_format' => array(), 'media_group' => array(), 'media_item' => array(), 'poll_group' => array(), 'search_log' => array(), 'search_page' => array(), 'search_link' => array(), 'seo_site' => array(), 'shop' => array(), 'shop_dir' => array(), 'shortlink' => array(), 'shortlink_dir' => array(), 'siteuser' => array(), 'siteuser_property' => array(), 'siteuser_property_dir' => array(), 'siteuser_group' => array(), 'siteuser_identity_provider' => array(), 'siteuser_relationship_type' => array(), 'site_alias' => array(), 'structure' => array(), 'structure_property' => array(), 'structure_property_dir' => array(), 'structure_menu' => array(), 'template' => array(), 'template_dir' => array(), 'webhook' => array(), )

$_hasOne

One-to-one relations

protected array<string|int, mixed> $_hasOne = array()
// Relation one-to-one for Book-Comment: protected $_hasOne = array('comment' => array()); // Equivalence relation one-to-one for Book-Comment with detailed conditions: // comment - Model name // foreign_key - Foreign key protected $_hasOne = array('comment' => array( 'foreign_key' => 'book_id' ));

$_hasRevisions

Has revisions

protected mixed $_hasRevisions = \FALSE

$_marksDeleted

Marks deleted entity

protected mixed $_marksDeleted = 'deleted'

$_modelColumns

List of columns in model with values

protected array<string|int, mixed> $_modelColumns = array()

$_modelName

Model name, e.g. 'book' for 'Book_Model'

protected mixed $_modelName = \NULL

$_nameColumn

Column consist item's name

protected string $_nameColumn = 'name'

$_preloadValues

List of preloaded values

protected array<string|int, mixed> $_preloadValues = array('name' => '', 'active' => 1, 'coding' => 'UTF-8', 'sorting' => 0, 'locale' => 'ru_RU.utf8', 'max_size_load_image' => 70, 'max_size_load_image_big' => 300, 'send_attendance_report' => 1, 'date_format' => '%d.%m.%Y', 'date_time_format' => '%d.%m.%Y %H:%M:%S', 'error' => 'E_ALL', 'error404' => 0, 'error403' => 0, 'robots' => "User-Agent: *\nDisallow: /admin\nDisallow: /search\nDisallow: /templates\nDisallow: /showbanner\nDisallow: /captcha.php\nDisallow: /403\nDisallow: /404\nAllow: /hostcmsfiles/css/*\nAllow: /hostcmsfiles/js/*\nAllow: /hostcmsfiles/jquery/*", 'closed' => 0, 'protect' => 1, 'safe_email' => 1, 'html_cache_use' => 0, 'html_cache_with' => '/*', 'html_cache_clear_probability' => 10000, 'uploaddir' => 'upload/', 'nesting_level' => 3, 'timezone' => '')

$_primaryKey

Primary key

protected string $_primaryKey = 'id'

$_shortcodeTags

List of Shortcodes tags

protected array<string|int, mixed> $_shortcodeTags = array()

$_showXmlAlias

Show alias data in XML

protected bool $_showXmlAlias = \FALSE

$_showXmlSiteuserIdentityProviders

Show identity providers data in XML

protected bool $_showXmlSiteuserIdentityProviders = \FALSE

$_skipColumns

List of skipped columns from table

protected array<string|int, mixed> $_skipColumns = array()

$_sorting

Default sorting for models

protected array<string|int, mixed> $_sorting = array('sites.sorting' => 'ASC', 'sites.name' => 'ASC')

$_tableColumns

List of columns in table

protected array<string|int, mixed> $_tableColumns = array()

$_tableName

Table name, e.g. 'books' for 'Book_Model'

protected mixed $_tableName = \NULL

$_typicalForbiddenTags

Typical forbidden tags.

protected array<string|int, mixed> $_typicalForbiddenTags = array()

Methods

__call()

Triggered when invoking inaccessible methods in an object context

public __call(string $name, array<string|int, mixed> $arguments) : mixed
Parameters
$name : string

method name

$arguments : array<string|int, mixed>

arguments

__construct()

Constructor.

public __construct([int $id = NULL ]) : mixed
Parameters
$id : int = NULL

entity ID

add()

Add related object. If main object does not save, it will save.

public add(Core_ORM $model[, string $relation = NULL ]) : self
Parameters
$model : Core_ORM
$relation : string = NULL
Tags
hostcms-event

modelname.onBeforeAdd

hostcms-event

modelname.onAfterAdd

$object = Core_ORM::factory('Main', 1);

$child = Core_ORM::factory('Child') $child->value1 = 'some value1'; $child->value2 = 'some value2';

$object->add($child);

Return values
self

addAllowedTag()

Add tag to allowed tags list

public addAllowedTag(string $tag) : self
Parameters
$tag : string

tag

Return values
self

addAllowedTags()

Add tags to allowed tags list

public addAllowedTags(array<string|int, mixed> $aTags) : self
Parameters
$aTags : array<string|int, mixed>

array of tags

Return values
self

addAttribute()

Add entity attribute

public addAttribute(string $name, string $value) : self
Parameters
$name : string
$value : string
Return values
self

addEntities()

Add children entities

public addEntities(array<string|int, mixed> $aChildrenEntities) : self
Parameters
$aChildrenEntities : array<string|int, mixed>
Return values
self

addEntity()

Add a children entity

public addEntity(Core_Entity $oChildrenEntity) : self
Parameters
$oChildrenEntity : Core_Entity
Return values
self

addForbiddenTag()

Add tag to forbidden tags list

public addForbiddenTag(string $tag) : self
Parameters
$tag : string

tag

Return values
self

addForbiddenTags()

Add tags to forbidden tags list

public addForbiddenTags(array<string|int, mixed> $aTags) : self
Parameters
$aTags : array<string|int, mixed>

array of tags

Return values
self

addXmlTag()

Add external tag for entity

public addXmlTag(string $tagName, string $tagValue[, array<string|int, mixed> $attributes = array() ]) : self
Parameters
$tagName : string

tag name

$tagValue : string

tag value

$attributes : array<string|int, mixed> = array()

attributes

Return values
self

applyMarksDeleted()

Apply markDeleted flag if is set

public applyMarksDeleted() : self
Return values
self

backupRevision()

Backup revision

public backupRevision() : self
Return values
self

changeCopiedName()

Set if change copied name is necessary

public changeCopiedName(bool $changeCopiedName) : self
Parameters
$changeCopiedName : bool

mode

Return values
self

changed()

Check model has been changed.

public changed() : bool
Return values
bool

changeStatus()

Change status of activity for site

public changeStatus() : self
Return values
self

check()

Check model values. If model has incorrect value, one will correct or call exception.

public check([bool $exception = FALSE ]) : self
$object = Core_ORM::factory('Book', 1); $object->value = 123; $object->check(TRUE)->save();
Parameters
$exception : bool = FALSE

Call exception (TRUE) or correct value (FALSE). Default FALSE.

Return values
self

chunk()

Retrieve a small chunk and feeds each one into $callback for processing. It stops looping when $callback returns FALSE

public chunk(int $count, callable $callback[, bool $bCache = TRUE ]) : bool
Parameters
$count : int

chunk size

$callback : callable
$bCache : bool = TRUE

use cache

Return values
bool

clear()

Clear object

public clear() : self
Return values
self

clearEntities()

Clear enities

public clearEntities() : self
Return values
self

clearEntitiesAfterGetXml()

Clear all entities after XML generation

public clearEntitiesAfterGetXml([bool $clear = TRUE ]) : self
Parameters
$clear : bool = TRUE

mode

Return values
self

clearXmlTags()

Clear external XML tags for entity.

public clearXmlTags() : mixed

create()

Insert new object data into database

public create() : self
Tags
hostcms-event

modelname.onBeforeCreate

hostcms-event

modelname.onAfterCreate

Return values
self

delete()

Delete object from database

public delete([mixed $primaryKey = NULL ]) : Core_Entity
Parameters
$primaryKey : mixed = NULL

primary key for deleting object

Tags
hostcms-event

site.onBeforeRedeclaredDelete

Return values
Core_Entity

deleteAll()

Delete all object

public deleteAll([bool $bCache = TRUE ][, int $limit = 100 ]) : self
Parameters
$bCache : bool = TRUE

use cache

$limit : int = 100

default 100 Core_ORM::factory('Book')->Comments->deleteAll();

Return values
self

deleteFavicon()

Delete favicon file

public deleteFavicon() : self
Return values
self

factory()

Create and return an object of model

public static factory( $modelName[,  $primaryKey = NULL ]) : mixed
Parameters
$modelName :

Model name

$primaryKey : = NULL

Primary key

find()

Find object in database and load one. Use clear() before find() with conditions!

public find([mixed $primaryKey = NULL ][, bool $bCache = TRUE ]) : self
Parameters
$primaryKey : mixed = NULL

default NULL

$bCache : bool = TRUE

use cache // Find an object and load (without lazy load) // If an object is not found, primary key sets NULL $oBook = Core_ORM::factory('Book')->find(1);

Return values
self

findAll()

Find all objects

public findAll([bool $bCache = TRUE ]) : array<string|int, mixed>
Parameters
$bCache : bool = TRUE

use cache, default TRUE // Find objects $aBooks = Core_ORM::factory('Book')->findAll(); foreach ($aBooks as $oBook) { var_dump($oBook->id); }

Tags
hostcms-event

modelname.onBeforeFindAll

hostcms-event

modelname.onAfterFindAll

Return values
array<string|int, mixed>

getAllowedTags()

Get allowed tags list

public getAllowedTags() : array<string|int, mixed>
Return values
array<string|int, mixed>

getChangedData()

Get changed columns with values

public getChangedData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getClassName()

Get Model CallsName

public static getClassName( $modelName) : string
Parameters
$modelName :

Model name

Return values
string

getCount()

Get count object

public getCount([bool $bCache = TRUE ][, string $fieldName = '*' ][, bool $distinct = FALSE ]) : int|false
Parameters
$bCache : bool = TRUE

use cache, default TRUE

$fieldName : string = '*'

default '*'

$distinct : bool = FALSE

default FALSE

Return values
int|false
$iCount = Core_ORM::factory('Book')->getCount(); var_dump($iCount);

getCurrentAlias()

Get current alias

public getCurrentAlias([bool $bCache = TRUE ]) : Site_Alias_Model|null
Parameters
$bCache : bool = TRUE

cache mode

Return values
Site_Alias_Model|null

getDatabaseDriver()

Get name of Database Driver

public static getDatabaseDriver() : string
Return values
string

getDataValues()

Get dataValues

public getDataValues() : array<string|int, mixed>
Return values
array<string|int, mixed>

getEntities()

Get children entities

public getEntities() : array<string|int, mixed>
Return values
array<string|int, mixed>

getErrorEmail()

Get first error email

public getErrorEmail() : string
Return values
string

getFaviconHref()

Get favicon file href

public getFaviconHref() : string
Return values
string

getFaviconPath()

Get favicon file path

public getFaviconPath() : string
Return values
string

getFieldIDs()

Get visible field's IDs

public getFieldIDs() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFields()

Get field's values

public getFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFirst()

Get fist entity, ordered by primary key

public getFirst([bool $bCache = TRUE ]) : null|Core_ORM
Parameters
$bCache : bool = TRUE

use cache, default TRUE

Return values
null|Core_ORM
$mObject = Core_ORM::factory('Book')->getFirst(); if (!is_null($mObject)) { echo $mObject; }

getFirstEmail()

Get first email

public getFirstEmail() : string
Return values
string

getForbiddenTags()

Get forbidden tags list

public getForbiddenTags() : array<string|int, mixed>
Return values
array<string|int, mixed>

getKeys()

Get site keys as array

public getKeys() : array<string|int, mixed>
Return values
array<string|int, mixed>

getLast()

Get last entity, ordered by primary key

public getLast([bool $bCache = TRUE ]) : null|Core_ORM
Parameters
$bCache : bool = TRUE

use cache, default TRUE

Return values
null|Core_ORM
$mObject = Core_ORM::factory('Book')->getLast(); if (!is_null($mObject)) { echo $mObject; }

getMarksDeleted()

Get column name for marks deleted

public getMarksDeleted() : string
Return values
string

getModelName()

Get model name, e.g. 'book' for 'Book_Model'

public getModelName() : string
Return values
string

getName()

Get entity name

public getName() : string
Tags
hostcms-event

modelname.onBeforeGetName

Return values
string

getNameColumn()

Get Name Column

public getNameColumn() : string
Return values
string

getPrimaryKey()

Get primary key value

public getPrimaryKey() : mixed

getPrimaryKeyName()

Get primary key name

public getPrimaryKeyName() : string
Return values
string

getRelatedSite()

Get Related Site

public getRelatedSite() : Site_Model|null
Tags
hostcms-event

site.onBeforeGetRelatedSite

hostcms-event

site.onAfterGetRelatedSite

Return values
Site_Model|null

getRelations()

Get $this->_relations

public getRelations() : array<string|int, mixed>
Return values
array<string|int, mixed>

getStdObject()

Get stdObject for entity and children entities

public getStdObject([mixed $attributePrefix = '_' ]) : stdObject
Parameters
$attributePrefix : mixed = '_'
Tags
hostcms-event

site.onBeforeRedeclaredGetStdObject

Return values
stdObject

getTableColumns()

Get tableColumns

public getTableColumns() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTableColums()

Get table columns. Fix wrong method name

public getTableColums() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTableName()

Get table name

public getTableName() : string
Return values
string

getTrashDescription()

Get entity description

public getTrashDescription() : string
Tags
hostcms-event

modelname.onBeforeGetTrashDescription

Return values
string

getXml()

Get XML for entity and children entities

public getXml() : string
Tags
hostcms-event

site.onBeforeRedeclaredGetXml

Return values
string

getXmlTagName()

Get tag name

public getXmlTagName() : string
Return values
string

getXmlTags()

Get external XML tags for entity.

public getXmlTags() : array<string|int, mixed>
Return values
array<string|int, mixed>

imgBackend()

public imgBackend() : mixed

isCallable()

Verify that the contents of a variable can be called as a function

public isCallable(string $methodName) : bool
Parameters
$methodName : string

method name

Return values
bool

isEmptyPrimaryKey()

Check is primary key NULL

public isEmptyPrimaryKey() : bool
Return values
bool

markDeleted()

Mark entity as deleted

public markDeleted() : self
Tags
hostcms-event

modelname.onBeforeMarkDeleted

hostcms-event

modelname.onAfterMarkDeleted

Return values
self

nameBadge()

Backend badge

public nameBadge(Admin_Form_Field $oAdmin_Form_Field, Admin_Form_Controller $oAdmin_Form_Controller) : string
Parameters
$oAdmin_Form_Field : Admin_Form_Field
$oAdmin_Form_Controller : Admin_Form_Controller
Return values
string

remove()

Remove related object. If main object does not save, it will save.

public remove(Core_ORM $model[, string $relation = NULL ]) : self
Parameters
$model : Core_ORM
$relation : string = NULL
Tags
hostcms-event

modelname.onBeforeRemove

hostcms-event

modelname.onAfterRemove

Return values
self

removeAllowedTag()

Remove tag from allowed tags list

public removeAllowedTag(string $tag) : self
Parameters
$tag : string

tag

Return values
self

removeForbiddenTag()

Remove tag from forbidden tags list

public removeForbiddenTag(string $tag) : self
Parameters
$tag : string

tag

Return values
self

rollbackRevision()

Rollback Revision

public rollbackRevision(int $revision_id) : self
Parameters
$revision_id : int

Revision ID

Return values
self

saveFavicon()

Specify favicon file

public saveFavicon(mixed $name, string $fileSourcePath) : self
Parameters
$name : mixed
$fileSourcePath : string

source file path

Return values
self

setCheck()

Set _check flag

public setCheck(bool $check) : self
Parameters
$check : bool

mode

Return values
self

setDatabaseDriver()

Set name of Database Driver

public static setDatabaseDriver(string $name) : mixed
Parameters
$name : string

driver's name

setMarksDeleted()

Set column name for marks deleted

public setMarksDeleted([mixed $marksDeleted = 'deleted' ]) : self
Parameters
$marksDeleted : mixed = 'deleted'
Return values
self

setRelations()

Set $this->_relations

public setRelations(array<string|int, mixed> $relations) : self
Parameters
$relations : array<string|int, mixed>

Array with new relations

Return values
self

setXmlTagName()

Set name of XML node

public setXmlTagName(string $tagName) : self
Parameters
$tagName : string

new tag name for node

Return values
self

showXmlAlias()

Show alias in XML

public showXmlAlias([bool $showXmlAlias = TRUE ]) : self
Parameters
$showXmlAlias : bool = TRUE
Return values
self

showXmlSiteuserIdentityProviders()

Show identity providers in XML

public showXmlSiteuserIdentityProviders([bool $showXmlSiteuserIdentityProviders = TRUE ]) : self
Parameters
$showXmlSiteuserIdentityProviders : bool = TRUE
Return values
self

timezoneBackend()

public timezoneBackend() : mixed

toArray()

Convert Object to Array

public toArray() : array<string|int, mixed>
Tags
hostcms-event

modelname.onAfterToArray

Return values
array<string|int, mixed>

undelete()

Turn off deleted status

public undelete() : self
Tags
hostcms-event

modelname.onBeforeUndelete

hostcms-event

modelname.onAfterUndelete

Return values
self

update()

Update object data into database

public update() : self
Tags
hostcms-event

modelname.onBeforeUpdate

hostcms-event

modelname.onAfterUpdate

Return values
self

uriSatisfyRequirements()

Check if $uri satisfy $requirements

public uriSatisfyRequirements(string $uri, string $requirements) : mixed
Parameters
$uri : string

URI

$requirements : string

Requirements separated with "\n"

_getCopiedName()

Get the name of a new copied object

protected _getCopiedName() : mixed

_getFaviconPath()

Get favicon path

protected _getFaviconPath() : mixed

_isTagAvailable()

Is $tagName Available

protected _isTagAvailable( $tagName) : bool
Parameters
$tagName :

Tag Name

Return values
bool

_prepareData()

Prepare entity and children entities

protected _prepareData() : self
Return values
self

        
On this page

Search results