- Class name: MessageCore
- Parent class: ObjectModel
- Source: classes/Message.php line 28
- $date_add
- $fieldsRequired
- $fieldsSize
- $fieldsValidate
- $id
- $id_cart
- $id_customer
- $id_employee
- $id_order
- $identifier
- $message
- $private
- $table
- $_cache
- $fieldsRequiredDatabase
- $fieldsRequiredLang
- $fieldsSizeLang
- $fieldsValidateLang
- $id_lang
- $id_shop
- $image_dir
- $image_format
- $langMultiShop
- $tables
- $webserviceParameters
- __construct
- add
- addFieldsRequiredDatabase
- associateTo
- clearCache
- delete
- deleteImage
- deleteSelection
- displayFieldName
- duplicateShops
- existsInDatabase
- getFields
- getFieldsRequiredDatabase
- getFieldsValidateLang
- getIdentifier
- getMessageByCartId
- getMessagesByCartId
- getMessagesByOrderId
- getTranslationsFields
- getValidationRules
- getWebserviceObjectList
- getWebserviceParameters
- hydrate
- hydrateCollection
- isAssociatedToGroupShop
- isAssociatedToShop
- isCurrentlyUsed
- isLangMultishop
- makeTranslationFields
- markAsReaded
- save
- toggleStatus
- update
- validateControler
- validateController
- validateFields
- validateFieldsLang
public string $date_add
- Visibility: public
- Source: classes/Message.php line 51.
protected mixed $fieldsRequired = array('message')
- Visibility: protected
- Source: classes/Message.php line 53.
protected mixed $fieldsSize = array('message' => 1600)
- Visibility: protected
- Source: classes/Message.php line 54.
protected mixed $fieldsValidate = array('message' => 'isCleanHtml', 'id_cart' => 'isUnsignedId', 'id_order' => 'isUnsignedId', 'id_customer' => 'isUnsignedId', 'id_employee' => 'isUnsignedId', 'private' => 'isBool')
- Visibility: protected
- Source: classes/Message.php line 55.
public mixed $id
- Visibility: public
- Source: classes/Message.php line 30.
public integer $id_cart
- Visibility: public
- Source: classes/Message.php line 36.
public integer $id_customer
- Visibility: public
- Source: classes/Message.php line 42.
public integer $id_employee
- Visibility: public
- Source: classes/Message.php line 45.
public integer $id_order
- Visibility: public
- Source: classes/Message.php line 39.
protected mixed $identifier = 'id_message'
- Visibility: protected
- Source: classes/Message.php line 60.
public string $message
- Visibility: public
- Source: classes/Message.php line 33.
public boolean $private
- Visibility: public
- Source: classes/Message.php line 48.
protected mixed $table = 'message'
- Visibility: protected
- Source: classes/Message.php line 59.
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 array $fieldsRequiredLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 59.
protected array $fieldsSizeLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 62.
protected array $fieldsValidateLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 65.
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 $tables = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 70.
protected array $webserviceParameters = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 73.
mixed ObjectModelCore::__construct(integer $id, integer $id_lang, $id_shop)
Build object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 115
- $id integer - Existing object id in order to load object (optional)
- $id_lang integer - Required if object is multilingual (optional)
- $id_shop mixed
mixed ObjectModelCore::add($autodate, $nullValues)
Add current object to database
return boolean Insertion result
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 202
- $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
mixed ObjectModelCore::clearCache($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 794
- $all mixed
mixed ObjectModelCore::delete()
Delete current object from database
return boolean Deletion result
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 349
boolean ObjectModelCore::deleteImage()
Delete images associated with the object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 898
mixed ObjectModelCore::deleteSelection($selection)
Delete several objects from database
return boolean Deletion result
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 387
- $selection 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
mixed MessageCore::getFields()
- Visibility: public
- Source: classes/Message.php line 62
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
string ObjectModelCore::getIdentifier()
Get object identifier name
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 964
array MessageCore::getMessageByCartId(integer $id_cart)
Return the last message from cart
- Visibility: public
- This method is static.
- Source: classes/Message.php line 83
- $id_cart integer - Cart ID
array MessageCore::getMessagesByCartId($id_cart, boolean $private, \Context $context)
Return messages from Cart ID
- Visibility: public
- This method is static.
- Source: classes/Message.php line 128
- $id_cart mixed
- $private boolean - return WITH private messages
- $context Context
array MessageCore::getMessagesByOrderId(integer $id_order, boolean $private, \Context $context)
Return messages from Order ID
- Visibility: public
- This method is static.
- Source: classes/Message.php line 101
- $id_order integer - Order ID
- $private boolean - return WITH private messages
- $context Context
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 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
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 MessageCore::markAsReaded(integer $id_message, $id_employee)
Registered a message 'readed'
- Visibility: public
- This method is static.
- Source: classes/Message.php line 154
- $id_message integer - Message ID
- $id_employee mixed
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
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
boolean ObjectModelCore::update($nullValues)
Update current object to database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 274
- $nullValues 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