本文整理汇总了PHP中Sonata\AdminBundle\Admin\AdminInterface::supportsPreviewMode方法的典型用法代码示例。如果您正苦于以下问题:PHP AdminInterface::supportsPreviewMode方法的具体用法?PHP AdminInterface::supportsPreviewMode怎么用?PHP AdminInterface::supportsPreviewMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Sonata\AdminBundle\Admin\AdminInterface
的用法示例。
在下文中一共展示了AdminInterface::supportsPreviewMode方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: isInPreviewMode
/**
* 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: isInPreviewMode
/**
* 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));
}