Pimcore\Tool::isFrontentRequestByAdmin PHP Method

isFrontentRequestByAdmin() public static method

eg. editmode, preview, version preview, always when it is a "frontend-request", but called out of the admin
public static isFrontentRequestByAdmin ( )
    public static function isFrontentRequestByAdmin()
    {
        if (array_key_exists("pimcore_editmode", $_REQUEST) || array_key_exists("pimcore_preview", $_REQUEST) || array_key_exists("pimcore_admin", $_REQUEST) || array_key_exists("pimcore_object_preview", $_REQUEST) || array_key_exists("pimcore_version", $_REQUEST) || preg_match("@^/pimcore_document_tag_renderlet@", $_SERVER["REQUEST_URI"])) {
            return true;
        }
        return false;
    }

Usage Example

コード例 #1
0
ファイル: Cache.php プロジェクト: emanuel-london/pimcore
 /**
  * @return bool
  */
 public function start()
 {
     if (\Pimcore\Tool::isFrontentRequestByAdmin() && !$this->force) {
         return false;
     }
     if ($content = CacheManager::load($this->key)) {
         echo $content;
         return true;
     }
     $this->captureEnabled = true;
     ob_start();
     return false;
 }
All Usage Examples Of Pimcore\Tool::isFrontentRequestByAdmin