本文整理汇总了PHP中Load::initialize方法的典型用法代码示例。如果您正苦于以下问题:PHP Load::initialize方法的具体用法?PHP Load::initialize怎么用?PHP Load::initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Load
的用法示例。
在下文中一共展示了Load::initialize方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initialize
public function initialize($smarty, $sessionManager, $config, $loadMapper, $args)
{
parent::initialize($smarty, $sessionManager, $config, $loadMapper, $args);
$customer = $this->getCustomer();
$this->addParam("user", $customer);
$this->addParam('load_class_name', get_called_class());
}
示例2: initialize
public function initialize($smarty, $sessionManager, $config, $loadMapper, $args)
{
parent::initialize($smarty, $sessionManager, $config, $loadMapper, $args);
$this->config = $config;
$this->putAllPhrasesInSmarty();
$allVarsArray = CmsSettingsManager::getInstance()->getAllVarsArray();
$this->addParam("cms_vars", json_encode($allVarsArray));
$this->setCustomerCartItemsCount();
$userLevel = $this->getUserLevel();
$customer = $this->getCustomer();
$this->addParam("user", $customer);
$this->addParam("userId", $this->getUserId());
$this->addParam('userLevel', $userLevel);
if ($userLevel == UserGroups::$USER) {
$this->addParam('userLoginType', $customer->getLoginType());
}
$this->addParam('userGroupsCompany', UserGroups::$COMPANY);
$this->addParam('userGroupsServiceCompany', UserGroups::$SERVICE_COMPANY);
$this->addParam('userGroupsUser', UserGroups::$USER);
$this->addParam('userGroupsGuest', UserGroups::$GUEST);
$this->addParam('userGroupsAdmin', UserGroups::$ADMIN);
if ($this->getUserLevel() === UserGroups::$ADMIN) {
$this->addParam('admin_price_group', $this->getCustomer()->getPriceGroup());
}
$this->addParam('DOCUMENT_ROOT', DOCUMENT_ROOT);
$this->addParam("salesPhone", $this->getCmsVar("pcstore_sales_phone_number"));
$this->addParam("salesPhone1", $this->getCmsVar("pcstore_sales_phone_number1"));
$this->addParam("wholePageWidth", $this->getCmsVar("whole_page_width"));
$this->addParam("passRegexp", $this->getCmsVar("password_regexp"));
$this->addParam("us_dollar_exchange", floatval($this->getCmsVar("us_dollar_exchange")));
if ($userLevel == UserGroups::$COMPANY) {
$this->addParam("customer_ping_pong_timeout_seconds", $this->getCmsVar("company_ping_pong_timeout_seconds"));
$this->addParam("company_item_check_message_timeout_seconds", $this->getCmsVar("company_item_check_message_timeout_seconds"));
} elseif ($userLevel == UserGroups::$USER) {
$this->addParam("customer_ping_pong_timeout_seconds", $this->getCmsVar("user_ping_pong_timeout_seconds"));
} elseif ($userLevel == UserGroups::$ADMIN) {
$this->addParam("customer_ping_pong_timeout_seconds", $this->getCmsVar("admin_ping_pong_timeout_seconds"));
} else {
$this->addParam("customer_ping_pong_timeout_seconds", $this->getCmsVar("guest_ping_pong_timeout_seconds"));
}
}