- Class name: CMSCategoryCore
- Parent class: ObjectModel
- Source: classes/CMSCategory.php line 28
- $_links
- $active
- $date_add
- $date_upd
- $description
- $fieldsRequired
- $fieldsRequiredLang
- $fieldsSize
- $fieldsSizeLang
- $fieldsValidate
- $fieldsValidateLang
- $id
- $id_cms_category
- $id_parent
- $identifier
- $level_depth
- $link_rewrite
- $meta_description
- $meta_keywords
- $meta_title
- $name
- $position
- $table
- $tables
- $_cache
- $fieldsRequiredDatabase
- $id_lang
- $id_shop
- $image_dir
- $image_format
- $langMultiShop
- $webserviceParameters
- __construct
- add
- addFieldsRequiredDatabase
- associateTo
- calcLevelDepth
- checkBeforeMove
- cleanPositions
- clearCache
- delete
- deleteImage
- deleteSelection
- displayFieldName
- duplicateShops
- existsInDatabase
- getCategories
- getChildren
- getFields
- getFieldsRequiredDatabase
- getFieldsValidateLang
- getHomeCategories
- getIdentifier
- getLastPosition
- getLink
- getLinkRewrite
- getName
- getParentsCategories
- getRecurseCategory
- getSimpleCategories
- getSubCategories
- getTranslationsFields
- getTranslationsFieldsChild
- getUrlRewriteInformations
- getValidationRules
- getWebserviceObjectList
- getWebserviceParameters
- hideCMSCategoryPosition
- hydrate
- hydrateCollection
- isAssociatedToGroupShop
- isAssociatedToShop
- isCurrentlyUsed
- isLangMultishop
- makeTranslationFields
- recurseCMSCategory
- recurseLiteCategTree
- recursiveDelete
- save
- searchByName
- searchByNameAndParentCMSCategoryId
- toggleStatus
- update
- updatePosition
- validateControler
- validateController
- validateFields
- validateFieldsLang
protected mixed $_links = array()
- Visibility: protected
- This property is static.
- Source: classes/CMSCategory.php line 71.
public boolean $active = 1
- Visibility: public
- Source: classes/CMSCategory.php line 39.
public string $date_add
- Visibility: public
- Source: classes/CMSCategory.php line 66.
public string $date_upd
- Visibility: public
- Source: classes/CMSCategory.php line 69.
public string $description
- Visibility: public
- Source: classes/CMSCategory.php line 42.
protected mixed $fieldsRequired = array('id_parent', 'active')
- Visibility: protected
- Source: classes/CMSCategory.php line 76.
protected mixed $fieldsRequiredLang = array('name', 'link_rewrite')
- Visibility: protected
- Source: classes/CMSCategory.php line 79.
protected mixed $fieldsSize = array('id_parent' => 10, 'active' => 1)
- Visibility: protected
- Source: classes/CMSCategory.php line 77.
protected mixed $fieldsSizeLang = array('name' => 64, 'link_rewrite' => 64, 'meta_title' => 128, 'meta_description' => 255, 'meta_keywords' => 255)
- Visibility: protected
- Source: classes/CMSCategory.php line 80.
protected mixed $fieldsValidate = array('active' => 'isBool', 'id_parent' => 'isUnsignedInt')
- Visibility: protected
- Source: classes/CMSCategory.php line 78.
protected mixed $fieldsValidateLang = array('name' => 'isCatalogName', 'link_rewrite' => 'isLinkRewrite', 'description' => 'isCleanHtml', 'meta_title' => 'isGenericName', 'meta_description' => 'isGenericName', 'meta_keywords' => 'isGenericName')
- Visibility: protected
- Source: classes/CMSCategory.php line 81.
public mixed $id
- Visibility: public
- Source: classes/CMSCategory.php line 30.
public integer $id_cms_category
- Visibility: public
- Source: classes/CMSCategory.php line 33.
public integer $id_parent
- Visibility: public
- Source: classes/CMSCategory.php line 45.
protected mixed $identifier = 'id_cms_category'
- Visibility: protected
- Source: classes/CMSCategory.php line 85.
public integer $level_depth
- Visibility: public
- Source: classes/CMSCategory.php line 51.
public string $link_rewrite
- Visibility: public
- Source: classes/CMSCategory.php line 54.
public string $meta_description
- Visibility: public
- Source: classes/CMSCategory.php line 63.
public string $meta_keywords
- Visibility: public
- Source: classes/CMSCategory.php line 60.
public string $meta_title
- Visibility: public
- Source: classes/CMSCategory.php line 57.
public string $name
- Visibility: public
- Source: classes/CMSCategory.php line 36.
public integer $position
- Visibility: public
- Source: classes/CMSCategory.php line 48.
protected mixed $table = 'cms_category'
- Visibility: protected
- Source: classes/CMSCategory.php line 84.
protected mixed $tables = array('cms_category', 'cms_category_lang')
- Visibility: protected
- Source: classes/CMSCategory.php line 74.
protected mixed $_cache = array()
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 75.
protected \fieldsRequiredDatabase $fieldsRequiredDatabase = null
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 50.
protected integer $id_lang = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 34.
protected mixed $id_shop = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 36.
protected string $image_dir = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 78.
protected string $image_format = 'jpg'
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 81.
protected mixed $langMultiShop = false
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 67.
protected array $webserviceParameters = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 73.
mixed CMSCategoryCore::__construct($id_cms_category, $id_lang)
- Visibility: public
- Source: classes/CMSCategory.php line 87
- $id_cms_category mixed
- $id_lang mixed
mixed CMSCategoryCore::add($autodate, $nullValues)
- Visibility: public
- Source: classes/CMSCategory.php line 117
- $autodate mixed
- $nullValues mixed
mixed ObjectModelCore::addFieldsRequiredDatabase($fields)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 780
- $fields mixed
boolean ObjectModelCore::associateTo(integer|array $id_shops, string $type)
This function associate an item to its context
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 828
- $id_shops integer|array
- $type string
integer CMSCategoryCore::calcLevelDepth()
Get the number of parent categories
- Visibility: public
- Source: classes/CMSCategory.php line 310
boolean CMSCategoryCore::checkBeforeMove($id_cms_category, integer $id_parent)
Check if CMSCategory can be moved in another one
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 439
- $id_cms_category mixed
- $id_parent integer - Parent candidate
mixed CMSCategoryCore::cleanPositions($id_category_parent)
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 601
- $id_category_parent mixed
mixed ObjectModelCore::clearCache($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 794
- $all mixed
mixed CMSCategoryCore::delete()
- Visibility: public
- Source: classes/CMSCategory.php line 257
boolean ObjectModelCore::deleteImage()
Delete images associated with the object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 898
mixed CMSCategoryCore::deleteSelection($categories)
Delete several categories from database
return boolean Deletion result
- Visibility: public
- Source: classes/CMSCategory.php line 294
- $categories mixed
mixed ObjectModelCore::displayFieldName($field, $className, $htmlentities, \Context $context)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 558
- $field mixed
- $className mixed
- $htmlentities mixed
- $context Context
mixed ObjectModelCore::duplicateShops($id)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 868
- $id mixed
boolean ObjectModelCore::existsInDatabase($id_entity, $table)
Specify if an ObjectModel is already in database
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 931
- $id_entity mixed - entity id
- $table mixed
array CMSCategoryCore::getCategories(integer $id_lang, boolean $active, $order)
Return available categories
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 325
- $id_lang integer - Language ID
- $active boolean - return only active categories
- $order mixed
mixed CMSCategoryCore::getChildren($id_parent, $id_lang, $active)
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 409
- $id_parent mixed
- $id_lang mixed
- $active mixed
mixed CMSCategoryCore::getFields()
- Visibility: public
- Source: classes/CMSCategory.php line 92
mixed ObjectModelCore::getFieldsRequiredDatabase($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 772
- $all mixed
array ObjectModelCore::getFieldsValidateLang()
Get list of fields related to language to validate
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 975
array CMSCategoryCore::getHomeCategories(integer $id_lang, boolean $active)
Return main categories
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 404
- $id_lang integer - Language ID
- $active boolean - return only active categories
string ObjectModelCore::getIdentifier()
Get object identifier name
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 964
mixed CMSCategoryCore::getLastPosition($id_category_parent)
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 620
- $id_category_parent mixed
mixed CMSCategoryCore::getLink(\Link $link)
- Visibility: public
- Source: classes/CMSCategory.php line 473
- $link Link
mixed CMSCategoryCore::getLinkRewrite($id_cms_category, $id_lang)
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 455
- $id_cms_category mixed
- $id_lang mixed
mixed CMSCategoryCore::getName($id_lang)
- Visibility: public
- Source: classes/CMSCategory.php line 480
- $id_lang mixed
array CMSCategoryCore::getParentsCategories(integer $id_lang)
Get Each parent CMSCategory of this CMSCategory until the root CMSCategory
- Visibility: public
- Source: classes/CMSCategory.php line 545
- $id_lang integer - Language ID
mixed CMSCategoryCore::getRecurseCategory($id_lang, $current, $active, $links, \Link $link, \Shop $shop)
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 180
mixed CMSCategoryCore::getSimpleCategories($id_lang)
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 347
- $id_lang mixed
array CMSCategoryCore::getSubCategories(integer $id_lang, boolean $active)
Return current CMSCategory childs
- Visibility: public
- Source: classes/CMSCategory.php line 364
- $id_lang integer - Language ID
- $active boolean - return only active categories
mixed ObjectModelCore::getTranslationsFields(array $fieldsArray)
Prepare multilingual fields for database insertion
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 430
- $fieldsArray array - Multilingual fields to prepare return array Prepared fields for database insertion
array CMSCategoryCore::getTranslationsFieldsChild()
Check then return multilingual fields for database interaction
- Visibility: public
- Source: classes/CMSCategory.php line 111
mixed CMSCategoryCore::getUrlRewriteInformations($id_category)
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 624
- $id_category mixed
array ObjectModelCore::getValidationRules(string $className)
Returns object validation rules (fields validity)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 89
- $className string - Child class name for static use (optional)
mixed ObjectModelCore::getWebserviceObjectList($sql_join, $sql_filter, $sql_sort, $sql_limit)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 747
- $sql_join mixed
- $sql_filter mixed
- $sql_sort mixed
- $sql_limit mixed
mixed ObjectModelCore::getWebserviceParameters($wsParamsAttributeName)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 617
- $wsParamsAttributeName mixed
string CMSCategoryCore::hideCMSCategoryPosition(string $name)
Hide CMSCategory prefix used for position
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 392
- $name string - CMSCategory name
mixed ObjectModelCore::hydrate(array $data, integer $id_lang)
Fill an object with given data. Data must be an array with this syntax: array(objProperty => value, objProperty2 => value, etc.)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 987
- $data array
- $id_lang integer
array ObjectModelCore::hydrateCollection(string $class, array $datas, integer $id_lang)
Fill (hydrate) a list of objects in order to get a collection of these objects
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1006
- $class string - Class of objects to hydrate
- $datas array - List of data (multi-dimensional array)
- $id_lang integer
boolean ObjectModelCore::isAssociatedToGroupShop(integer $id_group_shop)
Check if current object is associated to a group shop
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 854
- $id_group_shop integer
boolean ObjectModelCore::isAssociatedToShop(integer $id_shop)
Check if current object is associated to a shop
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 809
- $id_shop integer
boolean ObjectModelCore::isCurrentlyUsed(string $table, boolean $has_active_column)
This method is allow to know if a entity is currently used
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 948
- $table string - name of table linked to entity
- $has_active_column boolean - true if the table has an active column
mixed ObjectModelCore::isLangMultishop()
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 888
mixed ObjectModelCore::makeTranslationFields($fields, $fieldsArray, $id_language)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 447
- $fields mixed
- $fieldsArray mixed
- $id_language mixed
mixed CMSCategoryCore::recurseCMSCategory($categories, $current, $id_cms_category, $id_selected, $is_html)
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 221
- $categories mixed
- $current mixed
- $id_cms_category mixed
- $id_selected mixed
- $is_html mixed
array CMSCategoryCore::recurseLiteCategTree(integer $maxDepth, integer $currentDepth, $id_lang, array $excludedIdsArray, \Link $link)
Recursive scan of subcategories
- Visibility: public
- Source: classes/CMSCategory.php line 148
- $maxDepth integer - Maximum depth of the tree (i.e. 2 => 3 levels depth)
- $currentDepth integer - specify the current depth in the tree (don't use it, only for rucursivity!)
- $id_lang mixed
- $excludedIdsArray array - specify a list of ids to exclude of results
- $link Link
mixed CMSCategoryCore::recursiveDelete($toDelete, array $id_cms_category)
Recursively add specified CMSCategory childs to $toDelete array
- Visibility: protected
- Source: classes/CMSCategory.php line 241
- $toDelete mixed
- $id_cms_category array - Parent CMSCategory ID
mixed ObjectModelCore::save($nullValues, $autodate)
Save current object to database (add or update)
return boolean Insertion result
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 192
- $nullValues mixed
- $autodate mixed
array CMSCategoryCore::searchByName(integer $id_lang, string $query, boolean $unrestricted)
Light back office search for categories
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 502
- $id_lang integer - Language ID
- $query string - Searched string
- $unrestricted boolean - allows search without lang and includes first CMSCategory and exact match
array CMSCategoryCore::searchByNameAndParentCMSCategoryId(integer $id_lang, string $CMSCategory_name, integer $id_parent_CMSCategory)
Retrieve CMSCategory by name and parent CMSCategory id
- Visibility: public
- This method is static.
- Source: classes/CMSCategory.php line 527
- $id_lang integer - Language ID
- $CMSCategory_name string - Searched CMSCategory name
- $id_parent_CMSCategory integer - parent CMSCategory ID
mixed ObjectModelCore::toggleStatus()
Toggle object status in database
return boolean Update result
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 405
mixed CMSCategoryCore::update($nullValues)
- Visibility: public
- Source: classes/CMSCategory.php line 129
- $nullValues mixed
mixed CMSCategoryCore::updatePosition($way, $position)
- Visibility: public
- Source: classes/CMSCategory.php line 569
- $way mixed
- $position mixed
mixed ObjectModelCore::validateControler($htmlentities)
TODO: refactor rename all calls to this to validateController
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 571
- $htmlentities mixed
mixed ObjectModelCore::validateController($htmlentities)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 577
- $htmlentities mixed
mixed ObjectModelCore::validateFields($die, $errorReturn)
Check for fields validity before database interaction
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 481
- $die mixed
- $errorReturn mixed
mixed ObjectModelCore::validateFieldsLang($die, $errorReturn)
Check for multilingual fields validity before database interaction
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 514
- $die mixed
- $errorReturn mixed