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


PHP XLite::isAdminZone方法代码示例

本文整理汇总了PHP中XLite::isAdminZone方法的典型用法代码示例。如果您正苦于以下问题:PHP XLite::isAdminZone方法的具体用法?PHP XLite::isAdminZone怎么用?PHP XLite::isAdminZone使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在XLite的用法示例。


在下文中一共展示了XLite::isAdminZone方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: connect

 /**
  * Connect
  *
  * @return void
  */
 public function connect()
 {
     if (\XLite::isAdminZone()) {
         \Includes\Utils\ConfigParser::registerConfigFile('config.demo.php');
     }
     parent::connect();
 }
开发者ID:kingsj,项目名称:core,代码行数:12,代码来源:Database.php

示例2: getCommonJSData

 /**
  * Return common data to send to JS
  *
  * @return array
  */
 protected function getCommonJSData()
 {
     $data = parent::getCommonJSData();
     if (!\XLite::isAdminZone()) {
         $data += $this->getCloudSearchInitData();
     }
     return $data;
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:13,代码来源:Controller.php

示例3: getDefaultParams

 /**
  * Return list of the form default parameters
  *
  * @return array
  */
 protected function getDefaultParams()
 {
     $params = array();
     if (\XLite::isAdminZone()) {
         $params = array('amount' => \XLite\Core\Request::getInstance()->amount, 'order_number' => \XLite\Core\Request::getInstance()->order_number);
     }
     return $params;
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:13,代码来源:PopupSavedCards.php

示例4: getTotalRate

 /**
  * Get total rate
  *
  * @return float
  */
 public function getTotalRate()
 {
     $total = parent::getTotalRate();
     if (!\XLite::isAdminZone() && $this->getMethod()) {
         $total = \XLite\Module\CDev\VAT\Logic\Shipping\Tax::getInstance()->calculateRateCost($this, $total);
     }
     return $total;
 }
开发者ID:kingsj,项目名称:core,代码行数:13,代码来源:Rate.php

示例5: getCSSFiles

 /**
  * Return list of required CSS files
  *
  * @return array
  */
 public function getCSSFiles()
 {
     $list = parent::getCSSFiles();
     if (!\XLite::isAdminZone()) {
         $list[] = 'common/grid-list.css';
     }
     return $list;
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:13,代码来源:Subcategories.php

示例6: getName

 /**
  * get Shipping Method name
  * for Canada Post add '(Canada Post)' (except admin area, shipping methods page)
  *
  * @return string
  */
 public function getName()
 {
     $name = parent::getName();
     if ('capost' == $this->getProcessor() && !(\XLite::isAdminZone() && \XLite::getController() instanceof \XLite\Controller\Admin\ShippingMethods)) {
         $name = 'Canada Post ' . $name;
     }
     return $name;
 }
开发者ID:kewaunited,项目名称:xcart,代码行数:14,代码来源:Method.php

示例7: getDefaultTemplate

 /**
  * Return widget default template
  *
  * @return string
  */
 protected function getDefaultTemplate()
 {
     if (!\XLite::isAdminZone() && method_exists('\\XLite\\Core\\Request', 'isMobileDevice') && \XLite\Core\Request::isMobileDevice()) {
         return 'modules/Amazon/PayWithAmazon/checkout_mobile.tpl';
     } else {
         return 'modules/Amazon/PayWithAmazon/checkout.tpl';
     }
 }
开发者ID:kewaunited,项目名称:xcart,代码行数:13,代码来源:AmazonCheckout.php

示例8: getDefaultParams

 /**
  * Return list of the form default parameters
  *
  * @return array
  */
 protected function getDefaultParams()
 {
     $params = array();
     if (\XLite::isAdminZone()) {
         $params = array('profile_id' => \XLite\Core\Request::getInstance()->profile_id);
     }
     return $params;
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:13,代码来源:SavedCards.php

示例9: getAllowedTargets

 /**
  * Return list of allowed targets
  *
  * @return array
  */
 public static function getAllowedTargets()
 {
     $targets = parent::getAllowedTargets();
     $targets[] = 'order';
     if (!\XLite::isAdminZone()) {
         $targets[] = 'checkoutSuccess';
     }
     return $targets;
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:14,代码来源:PrintInvoice.php

示例10: getJSFiles

 /**
  * getJSFiles
  *
  * @return array
  */
 public function getJSFiles()
 {
     $list = parent::getJSFiles();
     if (!\XLite::isAdminZone() && \XLite\Module\CDev\Paypal\Main::isExpressCheckoutEnabled() && \XLite\Module\CDev\Paypal\Main::isInContextCheckoutAvailable()) {
         $list[] = 'modules/CDev/Paypal/button/in_context.js';
     } else {
         $list[] = 'modules/CDev/Paypal/button/default.js';
     }
     return $list;
 }
开发者ID:kewaunited,项目名称:xcart,代码行数:15,代码来源:AView.php

示例11: getThemeFiles

 /**
  * Return theme common files
  *
  * @param boolean $adminZone Admin zone flag OPTIONAL
  *
  * @return array
  */
 protected function getThemeFiles($adminZone = null)
 {
     $list = parent::getThemeFiles($adminZone);
     if (!(null === $adminZone ? \XLite::isAdminZone() : $adminZone)) {
         $list[static::RESOURCE_CSS][] = \XLite\Module\XC\ColorSchemes\Main::getColorSchemeCSS();
         if (!\XLite\Module\XC\ColorSchemes\Main::isDefaultColorScheme()) {
             $list[static::RESOURCE_CSS][] = array('file' => \XLite\Module\XC\ColorSchemes\Main::getColorSchemeLess(), 'media' => 'screen', 'merge' => 'bootstrap/css/bootstrap.less');
         }
     }
     return $list;
 }
开发者ID:kirkbauer2,项目名称:kirkxc,代码行数:18,代码来源:AView.php

示例12: getJSFiles

 /**
  * Get a list of JS files required to display the widget properly
  *
  * @return array
  */
 public function getJSFiles()
 {
     $list = parent::getJSFiles();
     if (!\XLite::isAdminZone()) {
         $list[] = 'modules/QSL/CloudSearch/loader.js';
         $list[] = 'modules/QSL/CloudSearch/init.js';
         $list[] = 'modules/QSL/CloudSearch/lib/handlebars.min.js';
         $list[] = 'modules/QSL/CloudSearch/lib/jquery.hoverIntent.min.js';
     }
     return $list;
 }
开发者ID:kewaunited,项目名称:xcart,代码行数:16,代码来源:AView.php

示例13: getCurrentLanguage

 /**
  * Get current language
  *
  * @return string Language code
  */
 protected function getCurrentLanguage()
 {
     // DO NOT change call order here
     if (!\XLite::isAdminZone() && function_exists('drupal_multilingual') && drupal_multilingual()) {
         global $language;
         if ($language instanceof \stdClass) {
             $object = \XLite\Core\Database::getRepo('XLite\\Model\\Language')->findOneByCode($language->language);
             // DO NOT use "===" here
             if (isset($object) && \XLite\Model\Language::ENABLED == $object->getStatus()) {
                 $result = $object->getCode();
             }
         }
     }
     return isset($result) ? $result : parent::getCurrentLanguage();
 }
开发者ID:kingsj,项目名称:core,代码行数:20,代码来源:Session.php

示例14: assignPriceRangeCondition

 /**
  * Assign price range-based search condition
  *
  * @param \Doctrine\ORM\QueryBuilder $queryBuilder Query builder
  * @param float                      $min          Minimum
  * @param float                      $max          Maximum
  *
  * @return void
  */
 protected function assignPriceRangeCondition(\Doctrine\ORM\QueryBuilder $queryBuilder, $min, $max)
 {
     if (\XLite::isAdminZone()) {
         parent::assignPriceRangeCondition($queryBuilder, $min, $max);
     } else {
         $queryBuilder->leftJoin('p.classes', 'classes', 'WITH');
         $cnd = \XLite\Module\CDev\VAT\Logic\Product\Tax::getInstance()->getSearchPriceCondition('p.price', 'classes');
         if (isset($min)) {
             $queryBuilder->andWhere($cnd . ' > :minPrice')->setParameter('minPrice', doubleval($min));
         }
         if (isset($max)) {
             $queryBuilder->andWhere($cnd . ' < :maxPrice')->setParameter('maxPrice', doubleval($max));
         }
     }
 }
开发者ID:kingsj,项目名称:core,代码行数:24,代码来源:Product.php

示例15: testIsAvailable

 public function testIsAvailable()
 {
     $order = $this->getTestOrder();
     $t = $order->getPaymentTransactions()->get(0);
     $r = $t->getData()->get(0);
     if (\XLite::isAdminZone()) {
         $r->setAccessLevel($r::ACCESS_ADMIN);
         $this->assertTrue($r->isAvailable(), 'check admin access');
         $r->setAccessLevel($r::ACCESS_CUSTOMER);
         $this->assertTrue($r->isAvailable(), 'check admin access #2');
     } else {
         $r->setAccessLevel($r::ACCESS_ADMIN);
         $this->assertFalse($r->isAvailable(), 'check customer access');
         $r->setAccessLevel($r::ACCESS_CUSTOMER);
         $this->assertTrue($r->isAvailable(), 'check customer access #2');
     }
 }
开发者ID:kingsj,项目名称:core,代码行数:17,代码来源:TransactionData.php


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