- Class name: HookCore
- Parent class: ObjectModel
- Source: classes/Hook.php line 28
- $_hook_alias
- $_hook_modules_cache
- $_hook_modules_cache_exec
- $definition
- $name
- $title
- $def
- $fieldsRequired
- $fieldsRequiredDatabase
- $fieldsRequiredLang
- $fieldsSize
- $fieldsSizeLang
- $fieldsValidate
- $fieldsValidateLang
- $id
- $id_lang
- $id_shop
- $identifier
- $image_dir
- $image_format
- $table
- $tables
- $webserviceParameters
- PDFInvoice
- __construct
- add
- addFieldsRequiredDatabase
- addProduct
- associateTo
- backBeforePayment
- clearCache
- delete
- deleteImage
- deleteProduct
- deleteSelection
- displayFieldName
- duplicateShops
- exec
- existsInDatabase
- formatFields
- formatValue
- get
- getDefinition
- getEntity
- getFields
- getFieldsLang
- getFieldsRequiredDatabase
- getHookModulesCacheExec
- getHooks
- getIdByName
- getModulesFromHook
- getRetroHookName
- getTranslationsFields
- getValidationRules
- getWebserviceObjectList
- getWebserviceParameters
- hydrate
- hydrateCollection
- isAssociatedToGroupShop
- isAssociatedToShop
- isCurrentlyUsed
- isLangMultishop
- makeTranslationFields
- newOrder
- orderConfirmation
- paymentReturn
- postUpdateOrderStatus
- preloadHookAlias
- preloadHookModulesCache
- productFooter
- productOutOfStock
- save
- setDefinitionRetrocompatibility
- toggleStatus
- update
- updateCarrier
- updateOrderStatus
- updateProduct
- updateProductAttribute
- updateQuantity
- validateControler
- validateController
- validateField
- validateFields
- validateFieldsLang
public mixed $_hook_alias = null
- Visibility: public
- This property is static.
- Source: classes/Hook.php line 49.
protected array $_hook_modules_cache = null
- Visibility: protected
- This property is static.
- Source: classes/Hook.php line 47.
protected mixed $_hook_modules_cache_exec = null
- Visibility: protected
- This property is static.
- Source: classes/Hook.php line 48.
public mixed $definition = array('table' => 'hook', 'primary' => 'id_hook', 'fields' => array('name' => array('type' => self::TYPE_STRING, 'validate' => 'isHookName', 'required' => true, 'size' => 32), 'title' => array('type' => self::TYPE_STRING)))
- Visibility: public
- This property is static.
- Source: classes/Hook.php line 37.
public string $name
- Visibility: public
- Source: classes/Hook.php line 31.
public mixed $title
- Visibility: public
- Source: classes/Hook.php line 32.
protected array $def
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 122.
protected mixed $fieldsRequired = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 72.
protected mixed $fieldsRequiredDatabase = null
- Visibility: protected
- This property is static.
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 57.
protected mixed $fieldsRequiredLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 87.
protected mixed $fieldsSize = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 77.
protected mixed $fieldsSizeLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 92.
protected mixed $fieldsValidate = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 82.
protected mixed $fieldsValidateLang = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 97.
public integer $id
- Visibility: public
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 48.
protected integer $id_lang = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 51.
protected mixed $id_shop = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 53.
protected mixed $identifier
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 67.
protected string $image_dir = null
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 108.
protected string $image_format = 'jpg'
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 111.
protected mixed $table
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 62.
protected mixed $tables = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 102.
protected array $webserviceParameters = array()
- Visibility: protected
- This property is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 105.
mixed HookCore::PDFInvoice($pdf, $id_order)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 407
- $pdf mixed
- $id_order mixed
mixed ObjectModelCore::__construct(integer $id, integer $id_lang, integer $id_shop)
Build object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 150
- $id integer - Existing object id in order to load object (optional)
- $id_lang integer - Required if object is multilingual (optional)
- $id_shop integer - ID shop for objects with multishop on langs
boolean ObjectModelCore::add(boolean $autodate, boolean $null_values)
Add current object to database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 372
- $autodate boolean
- $null_values boolean
mixed ObjectModelCore::addFieldsRequiredDatabase($fields)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 961
- $fields mixed
mixed HookCore::addProduct($product)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 491
- $product 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 1009
- $id_shops integer|array
- $type string
mixed HookCore::backBeforePayment($module)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 414
- $module mixed
mixed ObjectModelCore::clearCache($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 975
- $all mixed
boolean ObjectModelCore::delete()
Delete current object from database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 517
boolean ObjectModelCore::deleteImage()
Delete images associated with the object
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1079
mixed HookCore::deleteProduct($product)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 503
- $product mixed
boolean ObjectModelCore::deleteSelection(array $selection)
Delete several objects from database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 553
- $selection array
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 740
- $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 1049
- $id mixed
string HookCore::exec(string $hook_name, array $hookArgs, $id_module)
Execute modules for specified hook
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 219
- $hook_name string - Hook Name
- $hookArgs array - Parameters for the functions
- $id_module mixed
boolean ObjectModelCore::existsInDatabase(integer $id_entity, string $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 1113
- $id_entity integer
- $table string
array ObjectModelCore::formatFields(integer $id_lang)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 272
- $id_lang integer - If this parameter is given, only take lang fields
mixed ObjectModelCore::formatValue(mixed $value, integer $type, $with_quotes)
Format a data
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 319
- $value mixed
- $type integer
- $with_quotes mixed
integer HookCore::get(string $hookName)
Return hook ID from name
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 441
- $hookName string - Hook name
mixed ObjectModelCore::getDefinition($class, $field)
- Visibility: public
- This method is static.
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1209
- $class mixed
- $field mixed
mixed ObjectModelCore::getEntity($entity)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1269
- $entity mixed
array ObjectModelCore::getFields()
Prepare fields for ObjectModel class (add, update) All fields are verified (pSQL, intval.
..)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 234
array ObjectModelCore::getFieldsLang()
Prepare multilang fields
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 249
mixed ObjectModelCore::getFieldsRequiredDatabase($all)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 953
- $all mixed
string HookCore::getHookModulesCacheExec(string $hook_name, string $retro_hook_name)
Get Hook Module Cache Exec, testing hook name and retrocompatible hook name
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 194
- $hook_name string - Hook Name
- $retro_hook_name string - Retrocompatible Hook Name
array HookCore::getHooks(integer $position)
Return Hooks List
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 120
- $position integer
integer HookCore::getIdByName(string $hook_name)
Return hook ID from name
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 97
- $hook_name string - Hook name
array HookCore::getModulesFromHook(integer $hookID, integer $moduleID)
Return Hooks List
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 175
- $hookID integer
- $moduleID integer - (optionnal)
integer HookCore::getRetroHookName(string $hook_name)
Return retrocompatible hook name
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 78
- $hook_name string - Hook name
mixed ObjectModelCore::getTranslationsFields($fieldsArray)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 589
- $fieldsArray 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 130
- $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 929
- $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 799
- $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 1148
- $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 1167
- $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 1035
- $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 990
- $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 1131
- $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 1069
mixed ObjectModelCore::makeTranslationFields($fields, $fieldsArray, $id_language)
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 605
- $fields mixed
- $fieldsArray mixed
- $id_language mixed
mixed HookCore::newOrder($cart, $order, $customer, $currency, $orderStatus)
Called when quantity of a product is updated.
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 462
- $cart mixed
- $order mixed
- $customer mixed
- $currency mixed
- $orderStatus mixed
mixed HookCore::orderConfirmation($id_order)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 363
- $id_order mixed
mixed HookCore::paymentReturn($id_order, $id_module)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 385
- $id_order mixed
- $id_module mixed
mixed HookCore::postUpdateOrderStatus($newOrderStatusId, $id_order)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 353
- $newOrderStatusId mixed
- $id_order mixed
boolean HookCore::preloadHookAlias()
Preload hook alias list
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 59
boolean HookCore::preloadHookModulesCache()
Preload hook modules cache
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 133
mixed HookCore::productFooter($product, $category)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 479
- $product mixed
- $category mixed
mixed HookCore::productOutOfStock($product)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 485
- $product mixed
boolean ObjectModelCore::save(boolean $null_values, boolean $autodate)
Save current object to database (add or update)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 360
- $null_values boolean
- $autodate boolean
mixed ObjectModelCore::setDefinitionRetrocompatibility()
Retrocompatibility for classes without $definition static Remove this in 1.6 !
- Visibility: protected
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 1224
boolean ObjectModelCore::toggleStatus()
Toggle object status in database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 569
boolean ObjectModelCore::update(boolean $null_values)
Update current object to database
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 444
- $null_values boolean
mixed HookCore::updateCarrier($id_carrier, $carrier)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 422
- $id_carrier mixed
- $carrier mixed
mixed HookCore::updateOrderStatus($newOrderStatusId, $id_order)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 343
- $newOrderStatusId mixed
- $id_order mixed
mixed HookCore::updateProduct($product)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 497
- $product mixed
mixed HookCore::updateProductAttribute($id_product_attribute)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 509
- $id_product_attribute mixed
mixed HookCore::updateQuantity($product, $order)
- Visibility: public
- This method is static.
- Source: classes/Hook.php line 473
- $product mixed
- $order 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 753
- $htmlentities mixed
mixed ObjectModelCore::validateController($htmlentities)
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 759
- $htmlentities mixed
boolean|string ObjectModelCore::validateField(string $field, mixed $value, integer $id_lang)
Validate a single field
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 704
- $field string - Field name
- $value mixed - Field value
- $id_lang integer
boolean|string ObjectModelCore::validateFields(boolean $die, boolean $error_return)
Check for fields validity before database interaction
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 643
- $die boolean
- $error_return boolean
boolean|string ObjectModelCore::validateFieldsLang(boolean $die, boolean $error_return)
Check for multilingual fields validity before database interaction
- Visibility: public
- This method is defined by ObjectModelCore.
- Source: classes/ObjectModel.php line 669
- $die boolean
- $error_return boolean