当前位置: 首页>>代码示例>>PHP>>正文


PHP Load::initialize方法代码示例

本文整理汇总了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());
 }
开发者ID:pars5555,项目名称:pcstore,代码行数:7,代码来源:CmsLoad.class.php

示例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"));
     }
 }
开发者ID:pars5555,项目名称:pcstore,代码行数:41,代码来源:GuestLoad.class.php


注:本文中的Load::initialize方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。