本文整理汇总了PHP中TYPO3\TYPO3CR\Domain\Model\NodeInterface::isAccessible方法的典型用法代码示例。如果您正苦于以下问题:PHP NodeInterface::isAccessible方法的具体用法?PHP NodeInterface::isAccessible怎么用?PHP NodeInterface::isAccessible使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TYPO3\TYPO3CR\Domain\Model\NodeInterface
的用法示例。
在下文中一共展示了NodeInterface::isAccessible方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: filterNodeByContext
/**
* Filter a node by the current context.
* Will either return the node or NULL if it is not permitted in current context.
*
* @param NodeInterface $node
* @param Context $context
* @return \TYPO3\TYPO3CR\Domain\Model\Node|NULL
*/
protected function filterNodeByContext(NodeInterface $node, Context $context)
{
if (!$context->isRemovedContentShown() && $node->isRemoved()) {
return NULL;
}
if (!$context->isInvisibleContentShown() && !$node->isVisible()) {
return NULL;
}
if (!$context->isInaccessibleContentShown() && !$node->isAccessible()) {
return NULL;
}
return $node;
}
示例2: isNodeHidden
/**
* Return TRUE/FALSE if the node is currently hidden or not in the menu; taking the "renderHiddenInIndex" configuration
* of the Menu TypoScript object into account.
*
* This method needs to be called inside buildItems() in the subclasses.
*
* @param NodeInterface $node
* @return boolean
*/
protected function isNodeHidden(NodeInterface $node)
{
return $node->isVisible() === false || $this->getRenderHiddenInIndex() === false && $node->isHiddenInIndex() === true || $node->isAccessible() === false;
}
示例3: showWireframeAction
/**
* Shows the specified node and takes visibility and access restrictions into
* account.
*
* @param \TYPO3\TYPO3CR\Domain\Model\NodeInterface $node
* @return string View output for the specified node
*/
public function showWireframeAction(\TYPO3\TYPO3CR\Domain\Model\NodeInterface $node)
{
if (!$node->isAccessible()) {
try {
$this->authenticationManager->authenticate();
} catch (\Exception $exception) {
}
}
if (!$node->isAccessible() && !$this->nodeRepository->getContext()->isInaccessibleContentShown()) {
$this->throwStatus(403);
}
if (!$node->isVisible() && !$this->nodeRepository->getContext()->isInvisibleContentShown()) {
$this->throwStatus(404);
}
if ($node->getContentType() === 'TYPO3.Phoenix.ContentTypes:Shortcut') {
$this->view->assign('wireframeMode', $node);
}
$this->nodeRepository->getContext()->setCurrentNode($node);
$this->view->assign('value', $node);
$this->view->setTypoScriptPath('wireframeMode');
$this->response->setHeader('Cache-Control', 'public, s-maxage=600', FALSE);
}
示例4: isNodeHidden
/**
* Return TRUE/FALSE if the node is currently hidden or not in the menu; taking the "renderHiddenInIndex" configuration
* of the Menu TypoScript object into account.
*
* This method needs to be called inside buildItems() in the subclasses.
*
* @param NodeInterface $node
* @return boolean
*/
protected function isNodeHidden(NodeInterface $node)
{
return $node->isVisible() === FALSE || $this->getRenderHiddenInIndex() === FALSE && $node->isHiddenInIndex() === TRUE || $node->isAccessible() === FALSE;
}