本文整理汇总了PHP中Module::getInstanceById方法的典型用法代码示例。如果您正苦于以下问题:PHP Module::getInstanceById方法的具体用法?PHP Module::getInstanceById怎么用?PHP Module::getInstanceById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Module
的用法示例。
在下文中一共展示了Module::getInstanceById方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* Initialize order confirmation controller
* @see FrontController::init()
*/
public function init()
{
parent::init();
$this->id_cart = (int) Tools::getValue('id_cart', 0);
$is_guest = false;
/* check if the cart has been made by a Guest customer, for redirect link */
if (Cart::isGuestCartByCartId($this->id_cart)) {
$is_guest = true;
$redirectLink = 'index.php?controller=guest-tracking';
} else {
$redirectLink = 'index.php?controller=history';
}
$this->id_module = (int) Tools::getValue('id_module', 0);
$this->id_order = Order::getOrderByCartId((int) $this->id_cart);
$this->secure_key = Tools::getValue('key', false);
$order = new Order((int) $this->id_order);
if ($is_guest) {
$customer = new Customer((int) $order->id_customer);
$redirectLink .= '&id_order=' . $order->reference . '&email=' . urlencode($customer->email);
}
if (!$this->id_order || !$this->id_module || !$this->secure_key || empty($this->secure_key)) {
Tools::redirect($redirectLink . (Tools::isSubmit('slowvalidation') ? '&slowvalidation' : ''));
}
$this->reference = $order->reference;
if (!Validate::isLoadedObject($order) || $order->id_customer != $this->context->customer->id || $this->secure_key != $order->secure_key) {
Tools::redirect($redirectLink);
}
$module = Module::getInstanceById((int) $this->id_module);
if ($order->payment != $module->displayName) {
Tools::redirect($redirectLink);
}
}
示例2: renderForm
public function renderForm()
{
if (Context::getContext()->shop->getContext() != Shop::CONTEXT_SHOP && Shop::isFeatureActive()) {
$this->errors[] = $this->l('You have to select a shop before creating new orders.');
}
$id_cart = (int) Tools::getValue('id_cart');
$cart = new Cart((int) $id_cart);
if ($id_cart && !Validate::isLoadedObject($cart)) {
$this->errors[] = $this->l('This cart does not exists');
}
if ($id_cart && Validate::isLoadedObject($cart) && !$cart->id_customer) {
$this->errors[] = $this->l('The cart must have a customer');
}
if (count($this->errors)) {
return false;
}
parent::renderForm();
unset($this->toolbar_btn['save']);
$this->addJqueryPlugin(array('autocomplete', 'fancybox', 'typewatch'));
$defaults_order_state = array('cheque' => (int) Configuration::get('PS_OS_CHEQUE'), 'bankwire' => (int) Configuration::get('PS_OS_BANKWIRE'), 'cashondelivery' => Configuration::get('PS_OS_COD_VALIDATION') ? (int) Configuration::get('PS_OS_COD_VALIDATION') : (int) Configuration::get('PS_OS_PREPARATION'), 'other' => (int) Configuration::get('PS_OS_PAYMENT'));
$payment_modules = array();
foreach (PaymentModule::getInstalledPaymentModules() as $p_module) {
$payment_modules[] = Module::getInstanceById((int) $p_module['id_module']);
}
$this->context->smarty->assign(array('recyclable_pack' => (int) Configuration::get('PS_RECYCLABLE_PACK'), 'gift_wrapping' => (int) Configuration::get('PS_GIFT_WRAPPING'), 'cart' => $cart, 'currencies' => Currency::getCurrenciesByIdShop(Context::getContext()->shop->id), 'langs' => Language::getLanguages(true, Context::getContext()->shop->id), 'payment_modules' => $payment_modules, 'order_states' => OrderState::getOrderStates((int) Context::getContext()->language->id), 'defaults_order_state' => $defaults_order_state, 'show_toolbar' => $this->show_toolbar, 'toolbar_btn' => $this->toolbar_btn, 'toolbar_scroll' => $this->toolbar_scroll, 'PS_CATALOG_MODE' => Configuration::get('PS_CATALOG_MODE'), 'title' => array($this->l('Orders'), $this->l('Create order'))));
$this->content .= $this->createTemplate('form.tpl')->fetch();
}
示例3: preProcess
public function preProcess()
{
parent::preProcess();
$this->id_cart = (int) Tools::getValue('id_cart', 0);
/* check if the cart has been made by a Guest customer, for redirect link */
if (Cart::isGuestCartByCartId($this->id_cart)) {
$redirectLink = 'guest-tracking.php';
} else {
$redirectLink = 'history.php';
}
$this->id_module = (int) Tools::getValue('id_module', 0);
$this->id_order = Order::getOrderByCartId((int) $this->id_cart);
$this->secure_key = Tools::getValue('key', false);
if (!$this->id_order or !$this->id_module or !$this->secure_key or empty($this->secure_key)) {
Tools::redirect($redirectLink . (Tools::isSubmit('slowvalidation') ? '?slowvalidation' : ''));
}
$order = new Order((int) $this->id_order);
if (!Validate::isLoadedObject($order) or $order->id_customer != self::$cookie->id_customer or $this->secure_key != $order->secure_key) {
Tools::redirect($redirectLink);
}
$module = Module::getInstanceById((int) $this->id_module);
if ($order->payment != $module->displayName) {
Tools::redirect($redirectLink);
}
}
示例4: renderForm
public function renderForm($data)
{
$helper = $this->getFormHelper();
$id_shop = Context::getContext()->shop->id;
if (isset($data['params']['hookmodule'])) {
$hid = Hook::getIdByName($data['params']['hookmodule']);
if ($hid) {
$hms = Hook::getModulesFromHook($hid);
foreach ($hms as $hm) {
if ($data['params']['loadmodule'] == $hm['name']) {
$id_module = $hm['id_module'];
$module = Module::getInstanceById($id_module);
if (Validate::isLoadedObject($module)) {
!$module->unregisterHook((int) $hid, array($id_shop));
}
}
}
}
}
$modules = Module::getModulesInstalled(0);
$output = array();
$hooks = array('displayHome', 'displayLeftColumn', 'displayRightColumn', 'displayTop', 'displayHeaderRight', 'displaySlideshow', 'topNavigation', 'displayMainmenu', 'displayPromoteTop', 'displayRightColumn', 'displayLeftColumn', 'displayHome', 'displayFooter', 'displayBottom', 'displayContentBottom', 'displayFootNav', 'displayFooterTop', 'displayMapLocal', 'displayFooterBottom');
foreach ($hooks as $hook) {
$output[] = array('name' => $hook, 'id' => $hook);
}
$this->fields_form[1]['form'] = array('legend' => array('title' => $this->l('Widget Form.')), 'input' => array(array('type' => 'select', 'label' => $this->l('Select A Module'), 'name' => 'loadmodule', 'options' => array('query' => $modules, 'id' => 'name', 'name' => 'name'), 'default' => '1', 'desc' => $this->l('Select A Module is used as widget. the hook of this module was unhooked.')), array('type' => 'select', 'label' => $this->l('Select A Hook'), 'name' => 'hookmodule', 'options' => array('query' => $output, 'id' => 'name', 'name' => 'name'), 'default' => '1', 'desc' => $this->l('Select A hook is used to render module\'s content. the hook of this module was unhooked.
You could not rollback it\'s position. So you need asign it in position management of prestashop.'))), 'submit' => array('title' => $this->l('Save'), 'class' => 'button'));
$default_lang = (int) Configuration::get('PS_LANG_DEFAULT');
$a = $this->getConfigFieldsValues($data);
$helper->tpl_vars = array('fields_value' => $a, 'languages' => Context::getContext()->controller->getLanguages(), 'id_language' => $default_lang);
return $helper->generateForm($this->fields_form);
}
示例5: init
/**
* Initialize order confirmation controller
* @see FrontController::init()
*/
public function init()
{
parent::init();
if (isset($this->context->cookie->{'url_confirmation'})) {
unset($this->context->cookie->{'url_confirmation'});
}
$this->id_cart = (int) Tools::getValue('id_cart', 0);
$is_guest = false;
/* check if the cart has been made by a Guest customer, for redirect link */
if (Cart::isGuestCartByCartId($this->id_cart)) {
$is_guest = true;
$redirectLink = 'index.php?controller=guest-tracking';
} else {
$redirectLink = 'index.php?controller=history';
}
$this->id_module = (int) Tools::getValue('id_module', 0);
$this->id_order = Order::getOrderByCartId((int) $this->id_cart);
$this->secure_key = Tools::getValue('key', false);
$order = new Order((int) $this->id_order);
if ($is_guest) {
$customer = new Customer((int) $order->id_customer);
$redirectLink .= '&id_order=' . $order->reference . '&email=' . urlencode($customer->email);
}
if (!$this->id_order || !$this->id_module || !$this->secure_key || empty($this->secure_key)) {
Tools::redirect($redirectLink . (Tools::isSubmit('slowvalidation') ? '&slowvalidation' : ''));
}
$this->reference = $order->reference;
if (!Validate::isLoadedObject($order) || $order->id_customer != $this->context->customer->id || $this->secure_key != $order->secure_key) {
Tools::redirect($redirectLink);
}
$module = Module::getInstanceById((int) $this->id_module);
if (isset($order->payment) && isset($module->displayName) && $order->payment != $module->displayName && !in_array($order->payment, $this->get_mediosp())) {
Tools::redirect($redirectLink);
}
$url_banco2 = Tools::getValue('bankdest2', 0);
$url_dec_64 = base64_decode(strtr($url_banco2, '-_,', '+/='));
if ($url_banco2 != false) {
$this->url_banco = $url_dec_64;
Tools::redirect($this->url_banco);
}
$URL_PAYMENT_RECEIPT_HTML = Tools::getValue('URL_PAYMENT_RECEIPT_HTML', 0);
$url_iframe = base64_decode(strtr($URL_PAYMENT_RECEIPT_HTML, '-_,', '+/='));
if ($URL_PAYMENT_RECEIPT_HTML != false) {
$this->url_iframe = $url_iframe;
}
}
示例6: renderForm
/**
* AdminController::renderForm() override
* @see AdminController::renderForm()
*/
public function renderForm()
{
$current_profile = (int) $this->getCurrentProfileId();
$profiles = Profile::getProfiles($this->context->language->id);
$tabs = Tab::getTabs($this->context->language->id);
$accesses = array();
foreach ($profiles as $profile) {
$accesses[$profile['id_profile']] = Profile::getProfileAccesses($profile['id_profile']);
}
// Deleted id_tab that do not have access
foreach ($tabs as $key => $tab) {
// Don't allow permissions for unnamed tabs (ie. AdminLogin)
if (empty($tab['name'])) {
unset($tabs[$key]);
}
foreach ($this->accesses_black_list as $id_tab) {
if ($tab['id_tab'] == (int) $id_tab) {
unset($tabs[$key]);
}
}
}
$modules = array();
foreach ($profiles as $profile) {
$modules[$profile['id_profile']] = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('
SELECT ma.`id_module`, m.`name`, ma.`view`, ma.`configure`, ma.`uninstall`
FROM ' . _DB_PREFIX_ . 'module_access ma
LEFT JOIN ' . _DB_PREFIX_ . 'module m
ON ma.id_module = m.id_module
WHERE id_profile = ' . (int) $profile['id_profile'] . '
ORDER BY m.name
');
foreach ($modules[$profile['id_profile']] as $k => &$module) {
$m = Module::getInstanceById($module['id_module']);
// the following condition handles invalid modules
if ($m) {
$module['name'] = $m->displayName;
} else {
unset($modules[$profile['id_profile']][$k]);
}
}
uasort($modules[$profile['id_profile']], array($this, 'sortModuleByName'));
}
$this->fields_form = array('');
$this->tpl_form_vars = array('profiles' => $profiles, 'accesses' => $accesses, 'id_tab_parentmodule' => (int) Tab::getIdFromClassName('AdminParentModules'), 'id_tab_module' => (int) Tab::getIdFromClassName('AdminModules'), 'tabs' => $tabs, 'current_profile' => (int) $current_profile, 'admin_profile' => (int) _PS_ADMIN_PROFILE_, 'access_edit' => $this->tabAccess['edit'], 'perms' => array('view', 'add', 'edit', 'delete'), 'modules' => $modules, 'link' => $this->context->link);
return parent::renderForm();
}
示例7: runModulesCrons
protected function runModulesCrons()
{
$query = 'SELECT * FROM ' . _DB_PREFIX_ . $this->module->name . ' WHERE `active` = 1 AND `id_module` IS NOT NULL';
$crons = Db::getInstance()->executeS($query);
if (is_array($crons) && count($crons) > 0) {
foreach ($crons as &$cron) {
$module = Module::getInstanceById((int) $cron['id_module']);
if ($module == false) {
Db::getInstance()->execute('DELETE FROM ' . _DB_PREFIX_ . $this->name . ' WHERE `id_cronjob` = \'' . (int) $cron['id_cronjob'] . '\'');
break;
} elseif ($this->shouldBeExecuted($cron) == true) {
Hook::exec('actionCronJob', array(), $cron['id_module']);
$query = 'UPDATE ' . _DB_PREFIX_ . $this->module->name . ' SET `updated_at` = NOW(), `active` = IF (`one_shot` = TRUE, FALSE, `active`) WHERE `id_cronjob` = \'' . $cron['id_cronjob'] . '\'';
Db::getInstance()->execute($query);
}
}
}
}
示例8: init
/**
* Initialize order confirmation controller.
*
* @see FrontController::init()
*/
public function init()
{
parent::init();
$this->id_cart = (int) Tools::getValue('id_cart', 0);
$redirectLink = 'index.php?controller=history';
$this->id_module = (int) Tools::getValue('id_module', 0);
$this->id_order = Order::getOrderByCartId((int) $this->id_cart);
$this->secure_key = Tools::getValue('key', false);
$order = new Order((int) $this->id_order);
if (!$this->id_order || !$this->id_module || !$this->secure_key || empty($this->secure_key)) {
Tools::redirect($redirectLink . (Tools::isSubmit('slowvalidation') ? '&slowvalidation' : ''));
}
$this->reference = $order->reference;
if (!Validate::isLoadedObject($order) || $order->id_customer != $this->context->customer->id || $this->secure_key != $order->secure_key) {
Tools::redirect($redirectLink);
}
$module = Module::getInstanceById((int) $this->id_module);
if ($order->module != $module->name) {
Tools::redirect($redirectLink);
}
$this->order_presenter = new OrderPresenter();
}
示例9: getModuleArrFromBackuptbl
public static function getModuleArrFromBackuptbl($id_hook, $getshop = false)
{
$modulesArr = array();
$modules = Db::getInstance()->ExecuteS('
SELECT *
FROM `' . _DB_PREFIX_ . 'ovic_backup_hook_module`
WHERE `id_hook` = ' . (int) $id_hook);
$hookname = Hook::getNameById($id_hook);
if ($modules && count($modules) > 0) {
foreach ($modules as $module) {
$moduleObject = Module::getInstanceById((int) $module['id_module']);
if (!is_object($moduleObject) || !Validate::isModuleName($moduleObject->name)) {
continue;
}
$moduleHook = array();
$moduleHook[] = $moduleObject->name;
$moduleHook[] = $hookname;
if ($getshop) {
$modulesArr[$module['id_shop']][] = $moduleHook;
} else {
$modulesArr[] = $moduleHook;
}
}
}
return $modulesArr;
}
示例10: Message
CartRule::autoAddToCart($context);
if (!$context->cart->isMultiAddressDelivery()) {
$context->cart->setNoMultishipping();
}
} else {
$message = new Message();
$message->id_cart = $cart->id;
$message->message = 'Имя:' . ' ' . Tools::getValue('firstname') . "\r\n" . 'Эл.адрес:' . ' default@default.ru' . "\r\n" . 'Телефон:' . ' ' . Tools::getValue('phone') . "\r\n" . 'Время: ' . Tools::getValue('time');
$message->private = true;
$message->add();
}
if (Configuration::get('QUI_CARRIER')) {
$cart->id_carrier = Configuration::get('QUI_CARRIER');
}
if (Configuration::get('QUI_PAYMENT')) {
$payment = Module::getInstanceById(Configuration::get('QUI_PAYMENT'));
}
$cart->id_customer = (int) $customer->id;
$cookie->id_customer = (int) $customer->id;
$cookie->update();
if (Tools::getValue('comment')) {
$message = new Message();
$message->id_cart = $cart->id;
$message->message = 'Комментарий:' . ' ' . Tools::getValue('comment');
$message->private = true;
$message->add();
}
$cart->update();
$total = $cart->getOrderTotal(true, Cart::BOTH);
$order = new QuickOrderCreate();
if (Configuration::get('QUI_PAYMENT')) {
示例11: loadPaymentMethods
/**
* returns the payment modules list as an array indexed by module_id and containing the module name and the corresponding fia-net payment type
*
* @return array
*/
private function loadPaymentMethods()
{
if (_PS_VERSION_ < '1.5') {
$payments = $this->getInstalledPaymentModules();
} else {
$payments = PaymentModule::getPaymentModules();
}
$payment_modules = array();
foreach ($payments as $payment) {
$module = Module::getInstanceById($payment['id_module']);
//reloads submitted values if exists, loads conf otherwise
$certissim_type = Tools::isSubmit('certissim_' . $module->id . '_payment_type') ? Tools::getValue('certissim_' . $module->id . '_payment_type') : Configuration::get('CERTISSIM_' . $module->id . '_PAYMENT_TYPE');
$certissim_enabled = Tools::isSubmit('certissim_' . $module->id . '_payment_enabled') ? Tools::getValue('certissim_' . $module->id . '_payment_enabled') : Configuration::get('CERTISSIM_' . $module->id . '_PAYMENT_ENABLED');
$payment_modules[$module->id] = array('name' => $module->displayName, 'certissim_type' => $certissim_type, 'enabled' => $certissim_enabled);
}
return $payment_modules;
}
示例12: execModuleHook
public function execModuleHook($hook_name, $hook_args = array(), $id_module = null, $id_shop = null)
{
// Check arguments validity
if ($id_module && !is_numeric($id_module) || !Validate::isHookName($hook_name)) {
throw new PrestaShopException('Invalid id_module or hook_name');
}
// Check if hook exists
if (!($id_hook = Hook::getIdByName($hook_name))) {
return false;
}
// Store list of executed hooks on this page
Hook::$executed_hooks[$id_hook] = $hook_name;
$live_edit = false;
$context = Context::getContext();
if (!isset($hook_args['cookie']) || !$hook_args['cookie']) {
$hook_args['cookie'] = $context->cookie;
}
if (!isset($hook_args['cart']) || !$hook_args['cart']) {
$hook_args['cart'] = $context->cart;
}
$retro_hook_name = Hook::getRetroHookName($hook_name);
// Look on modules list
$altern = 0;
$output = '';
$different_shop = false;
if ($id_shop !== null && Validate::isUnsignedId($id_shop) && $id_shop != $context->shop->getContextShopID()) {
$old_context_shop_id = $context->shop->getContextShopID();
$old_context = $context->shop->getContext();
$old_shop = clone $context->shop;
$shop = new Shop((int) $id_shop);
if (Validate::isLoadedObject($shop)) {
$context->shop = $shop;
$context->shop->setContext(Shop::CONTEXT_SHOP, $shop->id);
$different_shop = true;
}
}
if (!($moduleInstance = Module::getInstanceById($id_module))) {
continue;
}
// Check which / if method is callable
$hook_callable = is_callable(array($moduleInstance, 'hook' . $hook_name));
$hook_retro_callable = is_callable(array($moduleInstance, 'hook' . $retro_hook_name));
if (($hook_callable || $hook_retro_callable) && Module::preCall($moduleInstance->name)) {
$hook_args['altern'] = ++$altern;
// Call hook method
if ($hook_callable) {
$display = $moduleInstance->{'hook' . $hook_name}($hook_args);
} elseif ($hook_retro_callable) {
$display = $moduleInstance->{'hook' . $retro_hook_name}($hook_args);
}
$output .= $display;
}
if ($different_shop) {
$context->shop = $old_shop;
$context->shop->setContext($old_context, $shop->id);
}
return $output;
}
示例13: AdminImport
$import = new AdminImport();
$languages = Language::getLanguages(false);
$defaultLanguage = (int) Configuration::get('PS_LANG_DEFAULT');
$fields = $import->getAvailableFields(true);
foreach ($fields as $field) {
$jsonArray[] = '{"field":"' . addslashes($field) . '"}';
}
die('[' . implode(',', $jsonArray) . ']');
}
if (array_key_exists('ajaxModulesPositions', $_POST)) {
$id_module = (int) Tools::getValue('id_module');
$id_hook = (int) Tools::getValue('id_hook');
$way = (int) Tools::getValue('way');
$positions = Tools::getValue(strval($id_hook));
$position = is_array($positions) ? array_search($id_hook . '_' . $id_module, $positions) : null;
$module = Module::getInstanceById($id_module);
if (Validate::isLoadedObject($module)) {
if ($module->updatePosition($id_hook, $way, $position)) {
die(true);
} else {
die('{"hasError" : true, "errors" : "Can not update module position"}');
}
} else {
die('{"hasError" : true, "errors" : "This module can not be loaded"}');
}
}
if (array_key_exists('ajaxCategoriesPositions', $_POST)) {
$id_category_to_move = (int) Tools::getValue('id_category_to_move');
$id_category_parent = (int) Tools::getValue('id_category_parent');
$way = (int) Tools::getValue('way');
$positions = Tools::getValue('category');
示例14: ajaxProcessChangeModuleHook
/**
* Change hook execute off module
*/
public function ajaxProcessChangeModuleHook()
{
$result = array();
$pagemeta = Tools::getValue('pagemeta');
$hookcolumn = Tools::getValue('hookcolumn');
$id_hookexec = (int) Tools::getValue('id_hookexec');
$hookexec_name = Hook::getNameById($id_hookexec);
$old_hook = (int) Tools::getValue('old_hook');
$id_module = (int) Tools::getValue('id_module');
if ($id_module && Validate::isUnsignedId($id_module) && $hookexec_name && Validate::isHookName($hookexec_name)) {
$result['status'] = true;
$moduleObject = Module::getInstanceById($id_module);
$HookedModulesArr = OvicLayoutControl::getSideBarModulesByPage($pagemeta, $hookcolumn, false);
if (!is_array($HookedModulesArr)) {
$result['status'] = false;
}
if ($result['status']) {
$moduleHook = array();
$moduleHook[] = $moduleObject->name;
$moduleHook[] = Hook::getNameById($old_hook);
$key = array_search($moduleHook, $HookedModulesArr);
if (array_key_exists($key, $HookedModulesArr)) {
$moduleHook[1] = $hookexec_name;
$HookedModulesArr[$key] = $moduleHook;
$result['status'] = OvicLayoutControl::registerSidebarModule($pagemeta, $hookcolumn, Tools::jsonEncode($HookedModulesArr), $this->context->shop->id);
$result['moduleinfo'] = $moduleObject->name . '-' . $hookexec_name;
}
}
}
Tools::clearCache();
die(Tools::jsonEncode($result));
}
示例15: foreach
foreach (${${"GLOBALS"}["nctaytx"]} as ${${"GLOBALS"}["vniipdyl"]}) {
${${"GLOBALS"}["fbrxiprf"]}[] = "{\"field\":\"" . addslashes(${${"GLOBALS"}["wrpesthj"]}) . "\"}";
}
die("[" . implode(",", ${${"GLOBALS"}["rrcmgcgvzw"]}) . "]");
}
if (Tools::isSubmit("ajaxModulesPositions")) {
${"GLOBALS"}["gmoqyrjz"] = "positions";
$znwojiwbe = "id_hook";
${${"GLOBALS"}["uhohwmowndl"]} = (int) Tools::getValue("id_module");
${$znwojiwbe} = (int) Tools::getValue("id_hook");
${"GLOBALS"}["dejbhwrjngdx"] = "positions";
${${"GLOBALS"}["bexdhpfik"]} = (int) Tools::getValue("way");
${"GLOBALS"}["ddwciizou"] = "id_hook";
${${"GLOBALS"}["dejbhwrjngdx"]} = Tools::getValue(strval(${${"GLOBALS"}["ddwciizou"]}));
${${"GLOBALS"}["iggxtsqn"]} = is_array(${${"GLOBALS"}["gmoqyrjz"]}) ? array_search(${${"GLOBALS"}["acmlhwatnv"]} . "_" . ${${"GLOBALS"}["uhohwmowndl"]}, ${${"GLOBALS"}["ejncxgwa"]}) : null;
${${"GLOBALS"}["cqfemfj"]} = Module::getInstanceById(${${"GLOBALS"}["uhohwmowndl"]});
if (Validate::isLoadedObject(${${"GLOBALS"}["cqfemfj"]})) {
${"GLOBALS"}["eopzpuoncab"] = "way";
${"GLOBALS"}["htfgqds"] = "position";
$bucidyjuwc = "id_hook";
if ($module->updatePosition(${$bucidyjuwc}, ${${"GLOBALS"}["eopzpuoncab"]}, ${${"GLOBALS"}["htfgqds"]})) {
die(true);
} else {
die("{\"hasError\" : true, \"errors\" : \"Can not update module position\"}");
}
} else {
die("{\"hasError\" : true, \"errors\" : \"This module can not be loaded\"}");
}
}
if (Tools::isSubmit("ajaxCategoriesPositions")) {
${"GLOBALS"}["moopdjenwj"] = "id_category_parent";