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


PHP Action\Admin类代码示例

本文整理汇总了PHP中Pimcore\Controller\Action\Admin的典型用法代码示例。如果您正苦于以下问题:PHP Admin类的具体用法?PHP Admin怎么用?PHP Admin使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: init

 public function init()
 {
     parent::init();
     // only for admins
     $this->checkPermission("adminer");
     $this->adminerHome = PIMCORE_DOCUMENT_ROOT . '/vendor/vrana/adminer/';
     // proxy for resources
     $path = $this->getRequest()->getPathInfo();
     $path = str_replace("/admin/external_adminer/", "", $path);
     if (preg_match("@\\.(css|js|ico|png|jpg|gif)\$@", $path)) {
         $filePath = $this->adminerHome . "/" . $path;
         if (preg_match("@.css\$@", $path)) {
             // it seems that css files need the right content-type (Chrome)
             header("Content-Type: text/css");
         }
         if (file_exists($filePath)) {
             echo file_get_contents($filePath);
             if (preg_match("@default.css\$@", $path)) {
                 // append custom styles, because in Adminer everything is hardcoded
                 echo file_get_contents($this->adminerHome . "designs/konya/adminer.css");
                 echo file_get_contents(PIMCORE_DOCUMENT_ROOT . "/pimcore/static6/css/adminer-modifications.css");
             }
         }
         exit;
     }
 }
开发者ID:sebwebdev,项目名称:pimcore,代码行数:26,代码来源:AdminerController.php

示例2: init

 public function init()
 {
     parent::init();
     // PHP 7.0 compatibility of adminer (throws some warnings)
     ini_set("display_errors", 0);
     // only for admins
     $this->checkPermission("adminer");
     // call this to keep the session 'open' so that Adminer can write to it
     $session = \Pimcore\Tool\Session::get();
     $this->adminerHome = PIMCORE_DOCUMENT_ROOT . '/vendor/vrana/adminer/';
     // proxy for resources
     $path = $this->getRequest()->getPathInfo();
     $path = str_replace("/admin/external_adminer/", "", $path);
     if (preg_match("@\\.(css|js|ico|png|jpg|gif)\$@", $path)) {
         $filePath = $this->adminerHome . "/" . $path;
         // it seems that css files need the right content-type (Chrome)
         if (preg_match("@.css\$@", $path)) {
             header("Content-Type: text/css");
         } elseif (preg_match("@.js\$@", $path)) {
             header("Content-Type: text/javascript");
         }
         if (file_exists($filePath)) {
             echo file_get_contents($filePath);
             if (preg_match("@default.css\$@", $path)) {
                 // append custom styles, because in Adminer everything is hardcoded
                 echo file_get_contents($this->adminerHome . "designs/konya/adminer.css");
                 echo file_get_contents(PIMCORE_DOCUMENT_ROOT . "/pimcore/static6/css/adminer-modifications.css");
             }
         }
         exit;
     }
 }
开发者ID:pimcore,项目名称:pimcore,代码行数:32,代码来源:AdminerController.php

示例3: init

 public function init()
 {
     parent::init();
     // only for admins
     $this->checkPermission("linfo");
     $this->linfoHome = PIMCORE_DOCUMENT_ROOT . '/vendor/linfo/linfo/';
 }
开发者ID:sebwebdev,项目名称:pimcore,代码行数:7,代码来源:LinfoController.php

示例4: init

 public function init()
 {
     parent::init();
     $this->checkPermission("backup");
     @ini_set("memory_limit", "-1");
     $this->session = \Pimcore\Tool\Session::get("pimcore_backup");
 }
开发者ID:Gerhard13,项目名称:pimcore,代码行数:7,代码来源:BackupController.php

示例5: init

 public function init()
 {
     parent::init();
     $this->protect();
     // IE compatibility
     //$this->getResponse()->setHeader("X-UA-Compatible", "IE=8; IE=9", true);
 }
开发者ID:elavarasann,项目名称:pimcore,代码行数:7,代码来源:LoginController.php

示例6: init

 /**
  * @throws \Exception
  */
 public function init()
 {
     parent::init();
     // check permissions
     $notRestrictedActions = array();
     if (!in_array($this->getParam("action"), $notRestrictedActions)) {
         $this->checkPermission("documents");
     }
 }
开发者ID:emanuel-london,项目名称:pimcore,代码行数:12,代码来源:Document.php

示例7: init

 public function init()
 {
     parent::init();
     // check permissions
     $notRestrictedActions = ["get-tree", "fieldcollection-list", "fieldcollection-tree", "fieldcollection-get", "get-class-definition-for-column-config", "objectbrick-list", "objectbrick-tree", "objectbrick-get"];
     if (!in_array($this->getParam("action"), $notRestrictedActions)) {
         $this->checkPermission("classes");
     }
 }
开发者ID:pimcore,项目名称:pimcore,代码行数:9,代码来源:ClassController.php

示例8: init

 public function init()
 {
     parent::init();
     // check permissions
     $notRestrictedActions = ["persona-list"];
     if (!in_array($this->getParam("action"), $notRestrictedActions)) {
         $this->checkPermission("targeting");
     }
 }
开发者ID:solverat,项目名称:pimcore,代码行数:9,代码来源:TargetingController.php

示例9: init

 public function init()
 {
     parent::init();
     // check permissions
     $notRestrictedActions = ["get-current-user", "update-current-user", "get-available-permissions", "get-minimal", "get-image", "upload-current-user-image"];
     if (!in_array($this->getParam("action"), $notRestrictedActions)) {
         $this->checkPermission("users");
     }
 }
开发者ID:solverat,项目名称:pimcore,代码行数:9,代码来源:UserController.php

示例10: init

 public function init()
 {
     parent::init();
     // recyclebin actions might take some time (save & restore)
     $timeout = 600;
     // 10 minutes
     @ini_set("max_execution_time", $timeout);
     set_time_limit($timeout);
     // check permissions
     $notRestrictedActions = array("add");
     if (!in_array($this->getParam("action"), $notRestrictedActions)) {
         $this->checkPermission("recyclebin");
     }
 }
开发者ID:emanuel-london,项目名称:pimcore,代码行数:14,代码来源:RecyclebinController.php

示例11: init

 public function init()
 {
     parent::init();
     // clear the opcache (as of PHP 5.5)
     if (function_exists("opcache_reset")) {
         opcache_reset();
     }
     // clear the APC opcode cache (<= PHP 5.4)
     if (function_exists("apc_clear_cache")) {
         apc_clear_cache();
     }
     // clear the Zend Optimizer cache (Zend Server <= PHP 5.4)
     if (function_exists('accelerator_reset')) {
         return accelerator_reset();
     }
     $this->checkPermission("update");
 }
开发者ID:elavarasann,项目名称:pimcore,代码行数:17,代码来源:IndexController.php

示例12: init

 public function init()
 {
     parent::init();
     $this->dashboardHelper = new \Pimcore\Helper\Dashboard($this->getUser());
 }
开发者ID:solverat,项目名称:pimcore,代码行数:5,代码来源:PortalController.php

示例13: init

 /**
  *
  */
 public function init()
 {
     parent::init();
 }
开发者ID:ChristophWurst,项目名称:pimcore,代码行数:7,代码来源:Reports.php

示例14: init

 public function init()
 {
     parent::init();
     $this->checkPermission("plugins");
 }
开发者ID:sfie,项目名称:pimcore,代码行数:5,代码来源:AdminController.php

示例15: init

 public function init()
 {
     if ($this->getParam("action") != "script") {
         parent::init();
     }
 }
开发者ID:ChristophWurst,项目名称:pimcore,代码行数:6,代码来源:AdminButtonController.php


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