Пример #1
0
 /**
  * Returns true if the request is in the preview workflow.
  *
  * That means either a preview is requested or the preview has already been shown
  * and it got approved/declined.
  *
  * @return bool
  */
 protected function isInPreviewMode()
 {
     return $this->admin->supportsPreviewMode() && ($this->isPreviewRequested() || $this->isPreviewApproved() || $this->isPreviewDeclined());
 }
Пример #2
0
 /**
  * Returns true if the request is in the preview workflow
  *
  * That means either a preview is requested or the preview has already been shown
  * and it got approved/declined.
  *
  * @param Request $request
  *
  * @return bool
  */
 protected function isInPreviewMode(Request $request = null)
 {
     $request = $this->resolveRequest($request);
     return $this->admin->supportsPreviewMode() && ($this->isPreviewRequested($request) || $this->isPreviewApproved($request) || $this->isPreviewDeclined($request));
 }