Skip to content

Latest commit

 

History

History
1563 lines (811 loc) · 33.7 KB

class.TaxManagerModuleCore.md

File metadata and controls

1563 lines (811 loc) · 33.7 KB

Class TaxManagerModuleCore

Contents

Properties

Methods

Properties

$tax_manager_class

public mixed $tax_manager_class

$_INSTANCE

protected mixed $_INSTANCE = array()

$_db

public mixed $_db

$_errors

protected mixed $_errors = false

$_generateConfigXmlMode

protected mixed $_generateConfigXmlMode = false

$_lang

protected array $_lang = array()

$_path

protected string $_path = NULL

$active

public boolean $active = false

$author

public string $author

$beforeUninstall

public string $beforeUninstall = NULL

$cache_permissions

protected mixed $cache_permissions = array()

$classInModule

public array $classInModule = array()

$context

protected \Context $context

$description

public string $description

$displayName

public string $displayName

$exceptionsCache

protected mixed $exceptionsCache = NULL

$id

public integer $id = NULL

$identifier

protected mixed $identifier = 'id_module'

$l_cache

protected mixed $l_cache = array()

$limited_countries

public array $limited_countries = array()

$modulesCache

protected mixed $modulesCache

$name

public string $name

$need_instance

public integer $need_instance = 1

$tab

public string $tab = NULL

$table

protected mixed $table = 'module'

$version

public float $version

$warning

public string $warning

Methods

__construct

mixed ModuleCore::__construct(string $name, \Context $context)

Constructor

Arguments

  • $name string - Module unique name
  • $context Context

_clearCache

mixed ModuleCore::_clearCache($template, $cacheId, $compileId)

Arguments

  • $template mixed
  • $cacheId mixed
  • $compileId mixed

_generateConfigXml

mixed ModuleCore::_generateConfigXml()

_getApplicableTemplateDir

mixed ModuleCore::_getApplicableTemplateDir($template)

Arguments

  • $template mixed

_isTemplateOverloaded

mixed ModuleCore::_isTemplateOverloaded($template)

Arguments

  • $template mixed

_isTemplateOverloadedStatic

mixed ModuleCore::_isTemplateOverloadedStatic($moduleName, $template)

Arguments

  • $moduleName mixed
  • $template mixed

cleanPositions

mixed ModuleCore::cleanPositions($id_hook, $shopList)

Arguments

  • $id_hook mixed
  • $shopList mixed

configXmlStringFormat

mixed ModuleCore::configXmlStringFormat($string)

Arguments

  • $string mixed

disable

mixed ModuleCore::disable(boolean $forceAll)

Desactivate current module.

Arguments

  • $forceAll boolean - If true, disable module for all shop

disableByName

true ModuleCore::disableByName(array|string $name)

This function disable module $name. If an $name is an array, this will disable all of them

Arguments

  • $name array|string

display

mixed ModuleCore::display($file, $template, $cacheId, $compileId)

Arguments

  • $file mixed
  • $template mixed
  • $cacheId mixed
  • $compileId mixed

displayConfirmation

mixed ModuleCore::displayConfirmation($string)

Arguments

  • $string mixed

displayError

mixed ModuleCore::displayError($error)

Arguments

  • $error mixed

displayFlags

mixed ModuleCore::displayFlags(array $languages, integer $default_language, string $ids, string $id, boolean $return, boolean $use_vars_instead_of_ids)

Display flags in forms for translations

Arguments

  • $languages array - All languages available
  • $default_language integer - Default language id
  • $ids string - Multilingual div ids in form
  • $id string - Current div id]
  • $return boolean - define the return way : false for a display, true for a return
  • $use_vars_instead_of_ids boolean - use an js vars instead of ids seperate by "¤"

editExceptions

mixed ModuleCore::editExceptions($hookID, $excepts)

Arguments

  • $hookID mixed
  • $excepts mixed

enable

mixed ModuleCore::enable(boolean $forceAll)

Activate current module.

Arguments

  • $forceAll boolean - If true, enable module for all shop

enableByName

true ModuleCore::enableByName(array|string $name)

This function enable module $name. If an $name is an array, this will enable all of them

Arguments

  • $name array|string

findTranslation

string ModuleCore::findTranslation(string $name, string $string, string $source)

find translation from $_MODULES and put it in self::$l_cache if not already exist and return it.

Arguments

  • $name string - name of the module
  • $string string - term to find
  • $source string - additional param for building translation key

getAuthorizedModules

mixed ModuleCore::getAuthorizedModules($group_id)

get Unauthorized modules for a client group

Arguments

  • $group_id mixed

getExceptions

mixed ModuleCore::getExceptions($hookID, $dispatch)

Arguments

  • $hookID mixed
  • $dispatch mixed

getInstanceById

\Module ModuleCore::getInstanceById($moduleID)

Return an instance of the specified module

Arguments

  • $moduleID mixed

getInstanceByName

\Module ModuleCore::getInstanceByName(string $moduleName)

Return an instance of the specified module

Arguments

  • $moduleName string - Module name

getModuleIdByName

integer ModuleCore::getModuleIdByName($name)

get id module by name

Arguments

  • $name mixed

getModuleNameFromClass

boolean|string ModuleCore::getModuleNameFromClass(mixed $currentClass)

This function is used to determine the module name of an AdminTab which belongs to a module, in order to keep translation related to a module in its directory (instead of $_LANGADM)

Arguments

  • $currentClass mixed - the

getModulesDirOnDisk

mixed ModuleCore::getModulesDirOnDisk()

getModulesInstalled

array ModuleCore::getModulesInstalled(integer $position)

Return installed modules

Arguments

  • $position integer - Take only positionnables modules

getModulesOnDisk

array ModuleCore::getModulesOnDisk(boolean $useConfig, $loggedOnAddons)

Return available modules

Arguments

  • $useConfig boolean - in order to use config.xml file in module dir
  • $loggedOnAddons mixed

getNonNativeModuleList

array ModuleCore::getNonNativeModuleList()

Return non native module

getPaymentModules

array ModuleCore::getPaymentModules()

Returns the list of the payment module associated to the current customer

getPermission

mixed ModuleCore::getPermission($variable, $employee)

Arguments

  • $variable mixed
  • $employee mixed

getPermissionStatic

mixed ModuleCore::getPermissionStatic($id_module, $variable, $employee)

Arguments

  • $id_module mixed
  • $variable mixed
  • $employee mixed

getTemplatePath

string ModuleCore::getTemplatePath(string $template)

Get realpath of a template of current module (check if template is overriden too)

Arguments

  • $template string

hookExec

string ModuleCore::hookExec(string $hook_name, array $hookArgs, $id_module)

Execute modules for specified hook

Arguments

  • $hook_name string - Hook Name
  • $hookArgs array - Parameters for the functions
  • $id_module mixed

hookExecPayment

mixed ModuleCore::hookExecPayment()

hookTaxManager

mixed TaxManagerModuleCore::hookTaxManager($args)

Arguments

  • $args mixed

install

mixed TaxManagerModuleCore::install()

isCached

mixed ModuleCore::isCached($template, $cacheId, $compileId)

Arguments

  • $template mixed
  • $cacheId mixed
  • $compileId mixed

isHookableOn

boolean ModuleCore::isHookableOn(string $hook_name)

Arguments

  • $hook_name string

isInstalled

mixed ModuleCore::isInstalled($moduleName)

Arguments

  • $moduleName mixed

isRegisteredInHook

mixed ModuleCore::isRegisteredInHook($hook)

Arguments

  • $hook mixed

l

string ModuleCore::l(string $string, boolean|string $specific, $id_lang)

Get translation for a given module text

Note: $specific parameter is mandatory for library files. Otherwise, translation key will not match for Module library when module is loaded with eval() Module::getModulesOnDisk()

Arguments

  • $string string - String to translate
  • $specific boolean|string - filename to use in translation key
  • $id_lang mixed

preCall

mixed ModuleCore::preCall($moduleName)

Arguments

  • $moduleName mixed

registerExceptions

boolean ModuleCore::registerExceptions(integer $id_hook, array $excepts, array $shopList)

Add exceptions for module->Hook

Arguments

  • $id_hook integer - Hook id
  • $excepts array - List of file name
  • $shopList array - List of shop

registerHook

boolean ModuleCore::registerHook(string $hook_name, array $shopList)

Connect module to a hook

Arguments

  • $hook_name string - Hook name
  • $shopList array - List of shop linked to the hook (if null, link hook to all shops)

sqlShopRestriction

mixed ModuleCore::sqlShopRestriction($share, $alias)

Arguments

  • $share mixed
  • $alias mixed

templateAssign

mixed ModuleCore::templateAssign(string $key, mixed $value)

Assign a smarty vars (same syntax as smarty->assign) but prefix all keys with module name

Arguments

  • $key string - Variable key (can be an array)
  • $value mixed - Variable value

uninstall

boolean ModuleCore::uninstall()

Delete module from datable

unregisterExceptions

boolean ModuleCore::unregisterExceptions($hook_id, array $shopList)

Unregister exceptions linked to module

Arguments

  • $hook_id mixed
  • $shopList array - List of shop

unregisterHook

boolean ModuleCore::unregisterHook($hook_id, array $shopList)

Unregister module from hook

Arguments

  • $hook_id mixed
  • $shopList array - List of shop

updatePosition

mixed ModuleCore::updatePosition($id_hook, $way, $position)

Arguments

  • $id_hook mixed
  • $way mixed
  • $position mixed