當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。