Shop_Model
extends Core_Entity
in package
Shop_Model
Tags
Table of Contents
- $config : mixed
- ORM config
- $currency_name : string
- Backend property
- $img : int
- Backend property
- $img_transactions : string
- 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
- $_cacheGroups : array<string|int, mixed>
- Cache of groups
- $_cacheItems : array<string|int, mixed>
- Cache of items
- $_changeCopiedName : bool
- Change copied name is necessary, default FALSE
- $_changedColumns : array<string|int, mixed>
- List of changed columns
- $_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 be shown.
- $_groupsTree : array<string|int, mixed>
- Tree of groups
- $_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
- $_nameColumn : string
- Column consist item's name
- $_oShop_Price_Setting : object
- Shop_Price_Setting object.
- $_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
- $_showXmlCounts : bool
- Calculate counts
- $_showXmlTaxes : bool
- Show taxes in XML
- $_skipColumns : array<string|int, mixed>
- List of skipped columns from table
- $_sorting : array<string|int, mixed>
- Default sorting for models <code> protected $_sorting = array( 'tablename.sorting' => 'ASC' ); </code>
- $_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.
- __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
- adminTransactionAmountBackend() : float
- Backend callback method
- applyMarksDeleted() : self
- Apply markDeleted flag if is set
- changeCopiedName() : self
- Set if change copied name is necessary
- changed() : bool
- Check model has been changed.
- 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() : self
- Delete object from database
- deleteAll() : self
- Delete all object
- deleteEmptyDirs() : mixed
- Delete empty groups in UPLOAD path for shop
- deleteWatermarkFile() : mixed
- Delete watermark 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
- getByStructureId() : self|null
- Get shop by structure id.
- getChangedData() : array<string|int, mixed>
- Get changed columns with values
- getClassName() : string
- Get Model CallsName
- getCount() : int|false
- Get count object
- getDatabaseDriver() : string
- Get name of Database Driver
- getDataValues() : array<string|int, mixed>
- Get dataValues
- getEntities() : array<string|int, mixed>
- Get children entities
- 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 shop's admin email
- getForbiddenTags() : array<string|int, mixed>
- Get forbidden tags list
- getHref() : string
- Get shop href
- 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
- getPath() : string
- Get shop path include CMS_FOLDER
- 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
- getWatermarkDefaultPositionX() : string
- The position of watermark on the X axis
- getWatermarkDefaultPositionY() : string
- The position of watermark on the Y axis
- getWatermarkFileHref() : string
- Get watermark file href
- getWatermarkFilePath() : string|null
- Get watermark file path
- 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.
- 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
- pathBackend() : string
- Backend callback method
- queryBuilder() : Core_QueryBuilder_Select
- Get query builder for select
- rebuildBackend() : string
- Backend callback method
- recount() : self
- Recount items and subgroups
- recountSets() : self
- Recount sets
- 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
- save() : self
- Save object. Use self::update() or self::create()
- saveWatermarkFile() : mixed
- Save watermark 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
- shop_currency_idBackend() : string
- Backend callback method
- shop_currency_idBadge() : string
- Backend badge
- showXmlCounts() : self
- Add comments XML to item
- showXmlTaxes() : self
- Add taxes to XML
- toArray() : array<string|int, mixed>
- Convert Object to Array
- undelete() : self
- Turn off deleted status
- update() : self
- Update object data into database
- _callSubgroup() : array<string|int, mixed>
- Recount subgroups
- _getCopiedName() : mixed
- Get the name of a new copied object
- _getShopPriceSetting() : object|null
- Get $oShop_Price_Setting object
- _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
$currency_name
Backend property
public
string
$currency_name
= \NULL
$img
Backend property
public
int
$img
= 1
$img_transactions
Backend property
public
string
$img_transactions
= 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(
'shop_dir' => array(),
'site' => array(),
'structure' => array(),
'shop_country' => array(),
'shop_currency' => array(),
'shop_order_status' => array(),
'shop_codetype' => array(),
'shop_measure' => array(),
// weight
'default_shop_measure' => array('model' => 'Shop_Measure', 'foreign_key' => 'default_shop_measure_id'),
// item's default measure
'user' => array(),
'siteuser_group' => array(),
'shop_company' => array(),
// old relation
'company' => array('foreign_key' => 'shop_company_id'),
)
$_cacheGroups
Cache of groups
protected
array<string|int, mixed>
$_cacheGroups
= array()
$_cacheItems
Cache of items
protected
array<string|int, mixed>
$_cacheItems
= 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 be shown.
protected
array<string|int, mixed>
$_forbiddenTags
= array('deleted', 'user_id', 'size_measure', 'yandex_market_name', 'items_sorting_direction', 'items_sorting_field', 'groups_sorting_direction', 'groups_sorting_field', 'image_large_max_width', 'image_large_max_height', 'image_small_max_width', 'image_small_max_height', 'siteuser_group_id', 'watermark_file', 'watermark_default_use_large_image', 'watermark_default_use_small_image', 'watermark_default_position_x', 'watermark_default_position_y', 'create_small_image', 'typograph_default_items', 'typograph_default_groups', 'apply_tags_automatically', 'change_filename', 'apply_keywords_automatically', 'group_image_small_max_width', 'group_image_large_max_width', 'group_image_small_max_height', 'group_image_large_max_height', 'producer_image_small_max_width', 'producer_image_large_max_width', 'producer_image_small_max_height', 'producer_image_large_max_height', 'preserve_aspect_ratio', 'preserve_aspect_ratio_small', 'preserve_aspect_ratio_group', 'preserve_aspect_ratio_group_small', 'seo_group_title_template', 'seo_group_keywords_template', 'seo_group_description_template', 'seo_group_h1_template', 'seo_item_title_template', 'seo_item_keywords_template', 'seo_item_description_template', 'seo_item_h1_template', 'seo_root_title_template', 'seo_root_description_template', 'seo_root_keywords_template', 'seo_root_h1_template', 'order_admin_subject', 'order_user_subject', 'confirm_admin_subject', 'confirm_user_subject', 'cancel_admin_subject', 'cancel_user_subject', 'shop_order_status_id', 'send_order_email_admin', 'send_order_email_user', 'guid', 'yandex_market_sales_notes_default', 'filter')
$_groupsTree
Tree of groups
protected
array<string|int, mixed>
$_groupsTree
= array()
$_hasMany
One-to-many or many-to-many relations
protected
array<string|int, mixed>
$_hasMany
= array('affiliate_plan' => array('through' => 'shop_affiliate_plan'), 'shop_affiliate_plan' => array(), 'shop_cart' => array(), 'shop_favorite' => array(), 'shop_favorite_list' => array(), 'shop_compare' => array(), 'shop_delivery' => array(), 'shop_bonus' => array(), 'shop_bonus_dir' => array(), 'shop_discount' => array(), 'shop_discount_dir' => array(), 'shop_group' => array(), 'shop_group_property' => array(), 'shop_group_property_dir' => array(), 'shop_item' => array(), 'shop_item_property' => array(), 'shop_item_property_dir' => array(), 'shop_order' => array(), 'shop_order_property' => array(), 'shop_order_property_dir' => array(), 'shop_payment_system' => array(), 'shop_print_form' => array(), 'shop_price' => array(), 'shop_producer' => array(), 'shop_producer_dir' => array(), 'shop_purchase_discount' => array(), 'shop_purchase_discount_dir' => array(), 'shop_purchase_discount_coupon_dir' => array(), 'shop_seller' => array(), 'shop_siteuser_transaction' => array(), 'shop_warehouse' => array(), 'shop_item_property_for_group' => array(), 'shop_item_delivery_option' => array(), 'deal' => array(), 'shop_discountcard' => array(), 'shop_discountcard_level' => array(), 'shop_discountcard_bonus_type' => array(), 'shop_price_setting' => array(), 'shop_filter_seo' => array(), 'shop_filter_seo_dir' => array(), 'shop_tab_dir' => array(), 'shop_tab' => array(), 'shop_comment_property' => array(), 'shop_comment_property_dir' => array(), 'shop_order_status' => array(), 'shop_order_item_status' => 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
protected
mixed
$_modelName
= 'shop'
$_nameColumn
Column consist item's name
protected
string
$_nameColumn
= 'name'
$_oShop_Price_Setting
Shop_Price_Setting object.
protected
object
$_oShop_Price_Setting
= \NULL
$_preloadValues
List of preloaded values
protected
array<string|int, mixed>
$_preloadValues
= array('use_captcha' => 1, 'image_small_max_width' => 100, 'image_large_max_width' => 800, 'image_small_max_height' => 100, 'image_large_max_height' => 800, 'group_image_small_max_width' => 100, 'group_image_large_max_width' => 800, 'group_image_small_max_height' => 100, 'group_image_large_max_height' => 800, 'items_sorting_field' => 0, 'items_sorting_direction' => 0, 'groups_sorting_field' => 0, 'groups_sorting_direction' => 0, 'url_type' => 0, 'apply_tags_automatically' => 0, 'write_off_paid_items' => 0, 'comment_active' => 0, 'format_date' => '%d.%m.%Y', 'format_datetime' => '%d.%m.%Y %H:%M:%S', 'typograph_default_items' => 1, 'typograph_default_groups' => 1, 'watermark_default_position_x' => '50%', 'watermark_default_position_y' => '100%', 'preserve_aspect_ratio' => 1, 'items_on_page' => 10, 'reserve' => 0, 'reserve_hours' => 24, 'watermark_file' => '', 'producer_image_small_max_width' => 100, 'producer_image_large_max_width' => 800, 'producer_image_small_max_height' => 100, 'producer_image_large_max_height' => 800, 'discountcard_template' => '{this.id}', 'invoice_template' => '{this.id}')
$_primaryKey
Primary key
protected
string
$_primaryKey
= 'id'
$_queryBuilder
Select query builder
protected
Core_QueryBuilder_Select
$_queryBuilder
= \NULL
$_shortcodeTags
List of Shortcodes tags
protected
array<string|int, mixed>
$_shortcodeTags
= array('description')
$_showXmlCounts
Calculate counts
protected
bool
$_showXmlCounts
= \TRUE
$_showXmlTaxes
Show taxes in XML
protected
bool
$_showXmlTaxes
= \FALSE
$_skipColumns
List of skipped columns from table
protected
array<string|int, mixed>
$_skipColumns
= array()
$_sorting
Default sorting for models <code> protected $_sorting = array( 'tablename.sorting' => 'ASC' ); </code>
protected
array<string|int, mixed>
$_sorting
= array()
$_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
Return values
mixed —__construct()
Constructor.
public
__construct([int $id = NULL ]) : mixed
Parameters
- $id : int = NULL
-
entity ID
Return values
mixed —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
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 —adminTransactionAmountBackend()
Backend callback method
public
adminTransactionAmountBackend() : float
Return values
float —applyMarksDeleted()
Apply markDeleted flag if is set
public
applyMarksDeleted() : 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 —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
Return values
mixed —copy()
Copy object
public
copy() : Core_Entity
Tags
Return values
Core_Entity —create()
Insert new object data into database
public
create() : self
Tags
Return values
self —delete()
Delete object from database
public
delete([mixed $primaryKey = NULL ]) : self
Parameters
- $primaryKey : mixed = NULL
-
primary key for deleting object
Tags
Return values
self —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 —deleteEmptyDirs()
Delete empty groups in UPLOAD path for shop
public
deleteEmptyDirs() : mixed
Return values
mixed —deleteWatermarkFile()
Delete watermark file
public
deleteWatermarkFile() : mixed
Return values
mixed —factory()
Create and return an object of model
public
static factory( $modelName[, $primaryKey = NULL ]) : mixed
Parameters
Return values
mixed —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
Return values
array<string|int, mixed> —getAllowedTags()
Get allowed tags list
public
getAllowedTags() : array<string|int, mixed>
Return values
array<string|int, mixed> —getByStructureId()
Get shop by structure id.
public
getByStructureId(int $structure_id) : self|null
Parameters
- $structure_id : int
Return values
self|null —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
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);
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> —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 shop's admin email
public
getFirstEmail() : string
Return values
string —getForbiddenTags()
Get forbidden tags list
public
getForbiddenTags() : array<string|int, mixed>
Return values
array<string|int, mixed> —getHref()
Get shop href
public
getHref() : string
Return values
string —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
Return values
string —getNameColumn()
Get Name Column
public
getNameColumn() : string
Return values
string —getPath()
Get shop path include CMS_FOLDER
public
getPath() : string
Return values
string —getPrimaryKey()
Get primary key value
public
getPrimaryKey() : mixed
Return values
mixed —getPrimaryKeyName()
Get primary key name
public
getPrimaryKeyName() : string
Return values
string —getRelatedSite()
Get Related Site
public
getRelatedSite() : Site_Model|null
Tags
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
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
Return values
string —getWatermarkDefaultPositionX()
The position of watermark on the X axis
public
getWatermarkDefaultPositionX() : string
Return values
string —getWatermarkDefaultPositionY()
The position of watermark on the Y axis
public
getWatermarkDefaultPositionY() : string
Return values
string —getWatermarkFileHref()
Get watermark file href
public
getWatermarkFileHref() : string
Return values
string —getWatermarkFilePath()
Get watermark file path
public
getWatermarkFilePath() : string|null
Return values
string|null —getXml()
Get XML for entity and children entities
public
getXml() : string
Tags
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> —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
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 —pathBackend()
Backend callback method
public
pathBackend() : string
Return values
string —queryBuilder()
Get query builder for select
public
queryBuilder() : Core_QueryBuilder_Select
Return values
Core_QueryBuilder_Select —rebuildBackend()
Backend callback method
public
rebuildBackend(mixed $oAdmin_Form_Field, mixed $oAdmin_Form_Controller) : string
Parameters
- $oAdmin_Form_Field : mixed
- $oAdmin_Form_Controller : mixed
Return values
string —recount()
Recount items and subgroups
public
recount() : self
Tags
Return values
self —recountSets()
Recount sets
public
recountSets() : self
Tags
Return values
self —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
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 —save()
Save object. Use self::update() or self::create()
public
save() : self
Return values
self —saveWatermarkFile()
Save watermark file
public
saveWatermarkFile(string $fileSourcePath) : mixed
Parameters
- $fileSourcePath : string
-
file to upload
Return values
mixed —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
Return values
mixed —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 —shop_currency_idBackend()
Backend callback method
public
shop_currency_idBackend() : string
Return values
string —shop_currency_idBadge()
Backend badge
public
shop_currency_idBadge(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 —showXmlCounts()
Add comments XML to item
public
showXmlCounts([mixed $showXmlCounts = TRUE ]) : self
Parameters
- $showXmlCounts : mixed = TRUE
Return values
self —showXmlTaxes()
Add taxes to XML
public
showXmlTaxes([bool $showXmlTaxes = TRUE ]) : self
Parameters
- $showXmlTaxes : bool = TRUE
Return values
self —toArray()
Convert Object to Array
public
toArray() : array<string|int, mixed>
Return values
array<string|int, mixed> —undelete()
Turn off deleted status
public
undelete() : self
Tags
Return values
self —update()
Update object data into database
public
update() : self
Tags
Return values
self —_callSubgroup()
Recount subgroups
protected
_callSubgroup(int $parent_id) : array<string|int, mixed>
Parameters
- $parent_id : int
-
parent group ID
Return values
array<string|int, mixed> —_getCopiedName()
Get the name of a new copied object
protected
_getCopiedName() : mixed
Return values
mixed —_getShopPriceSetting()
Get $oShop_Price_Setting object
protected
_getShopPriceSetting() : object|null
Return values
object|null —_isTagAvailable()
Is $tagName Available
protected
_isTagAvailable( $tagName) : bool
Parameters
Return values
bool —_prepareData()
Prepare entity and children entities
protected
_prepareData() : self
Tags
Return values
self —getDatabase()
Get Database
protected
getDatabase() : Core_DataBase