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


PHP Pimcore::inAdmin方法代码示例

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


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

示例1: __wakeup

 /**
  *
  */
 public function __wakeup()
 {
     $options = $this->getOptions();
     if (\Pimcore::inAdmin() || empty($options)) {
         $this->configureOptions();
     }
 }
开发者ID:sfie,项目名称:pimcore,代码行数:10,代码来源:Personamultiselect.php

示例2: callResourceMethod

 /**
  * @param string $method
  * @param array $args
  * @return mixed
  */
 public function callResourceMethod($method, $args)
 {
     $capture = false;
     if (Pimcore::inAdmin()) {
         $methodsToCheck = array("query", "update", "delete", "insert");
         if (in_array($method, $methodsToCheck)) {
             $capture = true;
             Pimcore_Resource::startCapturingDefinitionModifications($method, $args);
         }
     }
     //HACK - do not execute transaction methods when
     //Zend_Registry::set('explicit_transactions', true) was set earlier in code
     $transactionMethodsToCheck = array('beginTransaction', 'rollBack', 'commit');
     try {
         $explicitTransactions = Zend_Registry::get('explicit_transactions');
     } catch (Exception $e) {
         $explicitTransactions = false;
     }
     if (!$explicitTransactions || !in_array($method, $transactionMethodsToCheck)) {
         $r = call_user_func_array(array($this->getResource(), $method), $args);
     }
     if (Pimcore::inAdmin() && $capture) {
         Pimcore_Resource::stopCapturingDefinitionModifications();
     }
     return $r;
 }
开发者ID:shanky0110,项目名称:pimcore-custom,代码行数:31,代码来源:Wrapper.php

示例3: getTokenSettings

 /**
 * @return \Pimcore\Model\Object\Fieldcollection
 */
 public function getTokenSettings()
 {
     $preValue = $this->preGetValue("tokenSettings");
     if ($preValue !== null && !\Pimcore::inAdmin()) {
         return $preValue;
     }
     $data = $this->getClass()->getFieldDefinition("tokenSettings")->preGetData($this);
     return $data;
 }
开发者ID:ascertain,项目名称:NGshop,代码行数:12,代码来源:OnlineShopVoucherSeries.php

示例4: __set_state

 /**
  * @param $data
  * @return static
  */
 public static function __set_state($data)
 {
     $obj = parent::__set_state($data);
     $options = $obj->getOptions();
     if (\Pimcore::inAdmin() || empty($options)) {
         $obj->configureOptions();
     }
     return $obj;
 }
开发者ID:pimcore,项目名称:pimcore,代码行数:13,代码来源:Personamultiselect.php

示例5: getPriceRule

 /**
 * Get priceRule - Price Rule
 * @return CoreShop\Model\PriceRule
 */
 public function getPriceRule()
 {
     $preValue = $this->preGetValue("priceRule");
     if ($preValue !== null && !\Pimcore::inAdmin()) {
         return $preValue;
     }
     $data = $this->priceRule;
     return $data;
 }
开发者ID:yonetici,项目名称:pimcore-coreshop-demo,代码行数:13,代码来源:CoreShopCart.php

示例6: getName

 /**
 * Get name - Name
 * @return string
 */
 public function getName($language = null)
 {
     $data = $this->getLocalizedfields()->getLocalizedValue("name", $language);
     $preValue = $this->preGetValue("name");
     if ($preValue !== null && !\Pimcore::inAdmin()) {
         return $preValue;
     }
     return $data;
 }
开发者ID:rolandstoll,项目名称:pimcore,代码行数:13,代码来源:BlogCategory.php

示例7: getName

 /**
 * Get name - Name
 * @return string
 */
 public function getName()
 {
     $preValue = $this->preGetValue("name");
     if ($preValue !== null && !\Pimcore::inAdmin()) {
         return $preValue;
     }
     $data = $this->name;
     return $data;
 }
开发者ID:ninoslavjaric,项目名称:practice-development,代码行数:13,代码来源:BlogCategory.php

示例8: getFooterobjectdata

 /**
 * @return \Pimcore\Model\Object\Fieldcollection
 */
 public function getFooterobjectdata()
 {
     $preValue = $this->preGetValue("footerobjectdata");
     if ($preValue !== null && !\Pimcore::inAdmin()) {
         return $preValue;
     }
     $data = $this->getClass()->getFieldDefinition("footerobjectdata")->preGetData($this);
     return $data;
 }
开发者ID:ascertain,项目名称:NGshop,代码行数:12,代码来源:CFooterObject.php

示例9: init

 /**
  * @return User
  */
 protected function init()
 {
     //loads select list options
     $options = $this->getOptions();
     if (\Pimcore::inAdmin() || empty($options)) {
         $this->configureOptions();
     }
     return $this;
 }
开发者ID:pimcore,项目名称:pimcore,代码行数:12,代码来源:User.php

示例10: getChilds

 public function getChilds()
 {
     if ($this->childs === null) {
         $childs = parent::getChilds();
         $hardLink = $this->getHardLinkSource();
         if ($hardLink->getChildsFromSource() && $hardLink->getSourceDocument() && !Pimcore::inAdmin()) {
             foreach ($childs as &$c) {
                 $c = Document_Hardlink_Service::wrap($c);
                 $c->setHardLinkSource($hardLink);
                 $c->setPath(preg_replace("@^" . preg_quote($hardLink->getSourceDocument()->getFullpath()) . "@", $hardLink->getFullpath(), $c->getPath()));
             }
         }
         $this->setChilds($childs);
     }
     return $this->childs;
 }
开发者ID:shanky0110,项目名称:pimcore-custom,代码行数:16,代码来源:Snippet.php

示例11: getOfferedServices

 /**
 * @return \Pimcore\Model\Object\Objectbrick
 */
 public function getOfferedServices()
 {
     $data = $this->offeredServices;
     if (!$data) {
         if (\Pimcore\Tool::classExists("\\Pimcore\\Model\\Object\\Subscriptions\\OfferedServices")) {
             $data = new \Pimcore\Model\Object\Subscriptions\OfferedServices($this, "offeredServices");
             $this->offeredServices = $data;
         } else {
             return null;
         }
     }
     $preValue = $this->preGetValue("offeredServices");
     if ($preValue !== null && !\Pimcore::inAdmin()) {
         return $preValue;
     }
     return $data;
 }
开发者ID:cometCube,项目名称:nyt,代码行数:20,代码来源:Subscriptions.php

示例12: __wakeup

 public function __wakeup()
 {
     if (Pimcore::inAdmin()) {
         $this->configureOptions();
     }
 }
开发者ID:ngocanh,项目名称:pimcore,代码行数:6,代码来源:User.php

示例13: getPath

 /**
  * @return string
  */
 public function getPath()
 {
     // check for site, if so rewrite the path for output
     try {
         if (!\Pimcore::inAdmin() && Site::isSiteRequest()) {
             $site = Site::getCurrentSite();
             if ($site instanceof Site) {
                 if ($site->getRootDocument() instanceof Document\Page && $site->getRootDocument() !== $this) {
                     $rootPath = $site->getRootPath();
                     $rootPath = preg_quote($rootPath);
                     return preg_replace("@^" . $rootPath . "@", "", $this->path);
                 }
             }
         }
     } catch (\Exception $e) {
         \Logger::error($e);
     }
     return $this->path;
 }
开发者ID:yonetici,项目名称:pimcore-coreshop-demo,代码行数:22,代码来源:Document.php

示例14: getIcon

 /**
 * Get icon - icon
 * @return string
 */
 public function getIcon()
 {
     $preValue = $this->preGetValue("icon");
     if ($preValue !== null && !\Pimcore::inAdmin()) {
         return $preValue;
     }
     $data = $this->icon;
     return $data;
 }
开发者ID:sgabison,项目名称:resaExpress,代码行数:13,代码来源:Tags.php

示例15: getImage_3

 /**
 * Get image_3 - Image
 * @return \Pimcore\Model\Asset\Image
 */
 public function getImage_3()
 {
     $preValue = $this->preGetValue("image_3");
     if ($preValue !== null && !\Pimcore::inAdmin()) {
         return $preValue;
     }
     $data = $this->image_3;
     return $data;
 }
开发者ID:pimcore,项目名称:pimcore,代码行数:13,代码来源:News.php


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