本文整理汇总了PHP中def_module::errorPanic方法的典型用法代码示例。如果您正苦于以下问题:PHP def_module::errorPanic方法的具体用法?PHP def_module::errorPanic怎么用?PHP def_module::errorPanic使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类def_module
的用法示例。
在下文中一共展示了def_module::errorPanic方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: config
public function config()
{
$config = mainConfiguration::getInstance();
$regedit = regedit::getInstance();
$params = array('emarket-options' => array('int:max_compare_items' => NULL, 'boolean:currency' => NULL, 'boolean:currency' => NULL, 'boolean:stores' => NULL, 'boolean:payment' => NULL, 'boolean:delivery' => NULL, 'boolean:discounts' => NULL, 'boolean:delivery-with-address' => NULL, 'string:header-phone-number' => NULL));
$mode = (string) getRequest('param0');
if ($mode == "do") {
$params = $this->expectParams($params);
$max_comp =& $params['emarket-options']['int:max_compare_items'];
$max_comp = floor($max_comp);
if (!$max_comp || $max_comp <= 1) {
$config->set('modules', 'emarket.compare.max-items', 2);
def_module::errorNewMessage("%error-compare-wrong-data%");
def_module::errorPanic();
}
$config->set('modules', 'emarket.compare.max-items', $params['emarket-options']['int:max_compare_items']);
$regedit->setVar('//modules/emarket/enable-discounts', $params['emarket-options']['boolean:discounts']);
$regedit->setVar('//modules/emarket/enable-currency', $params['emarket-options']['boolean:currency']);
$regedit->setVar('//modules/emarket/enable-stores', $params['emarket-options']['boolean:stores']);
$regedit->setVar('//modules/emarket/enable-payment', $params['emarket-options']['boolean:payment']);
$regedit->setVar('//modules/emarket/enable-delivery', $params['emarket-options']['boolean:delivery']);
$regedit->setVar('//modules/emarket/delivery-with-address', $params['emarket-options']['boolean:delivery-with-address']);
$regedit->setVar('//modules/emarket/header-phone-number', $params['emarket-options']['string:header-phone-number']);
self::switchGroupsActivity('order_delivery_props', $params['emarket-options']['boolean:delivery']);
self::switchGroupsActivity('order_discount_props', $params['emarket-options']['boolean:discounts']);
self::switchGroupsActivity('order_payment_props', $params['emarket-options']['boolean:payment']);
$this->chooseRedirect();
}
$params['emarket-options']['int:max_compare_items'] = $config->get('modules', 'emarket.compare.max-items');
$params['emarket-options']['boolean:discounts'] = $regedit->getVal('//modules/emarket/enable-discounts');
$params['emarket-options']['boolean:currency'] = $regedit->getVal('//modules/emarket/enable-currency');
$params['emarket-options']['boolean:stores'] = $regedit->getVal('//modules/emarket/enable-stores');
$params['emarket-options']['boolean:payment'] = $regedit->getVal('//modules/emarket/enable-payment');
$params['emarket-options']['boolean:delivery'] = $regedit->getVal('//modules/emarket/enable-delivery');
$params['emarket-options']['boolean:delivery-with-address'] = $regedit->getVal('//modules/emarket/delivery-with-address');
$params['emarket-options']['string:header-phone-number'] = $regedit->getVal('//modules/emarket/header-phone-number');
$this->setDataType('settings');
$this->setActionType('modify');
$data = $this->prepareData($params, 'settings');
$this->setData($data);
return $this->doData();
}