FluidTYPO3\Vhs\ViewHelpers\Condition\Page\HasSubpagesViewHelper::evaluateCondition PHP Method

evaluateCondition() protected static method

protected static evaluateCondition ( array $arguments = null ) : boolean
$arguments array
return boolean
    protected static function evaluateCondition($arguments = null)
    {
        $pageUid = $arguments['pageUid'];
        $includeHiddenInMenu = (bool) $arguments['includeHiddenInMenu'];
        $includeAccessProtected = (bool) $arguments['includeAccessProtected'];
        if (null === $pageUid || true === empty($pageUid) || 0 === (int) $pageUid) {
            $pageUid = $GLOBALS['TSFE']->id;
        }
        if (self::$pageService === null) {
            $objectManager = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Object\\ObjectManager');
            self::$pageService = $objectManager->get('FluidTYPO3\\Vhs\\Service\\PageService');
        }
        $menu = self::$pageService->getMenu($pageUid, [], $includeHiddenInMenu, false, $includeAccessProtected);
        return 0 < count($menu);
    }