本文整理汇总了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();
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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';
}
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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();
}
示例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));
}
}
}
示例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');
}
}