FluidTYPO3\Vhs\ViewHelpers\Menu\AbstractMenuViewHelper::initializeArguments PHP Method

initializeArguments() public method

Initialize
public initializeArguments ( ) : void
return void
    public function initializeArguments()
    {
        $this->registerUniversalTagAttributes();
        $this->registerPageRecordArguments();
        $this->registerArgument('tagName', 'string', 'Tag name to use for enclosing container', false, 'ul');
        $this->registerArgument('tagNameChildren', 'string', 'Tag name to use for child nodes surrounding links. If set to "a" enables non-wrapping mode.', false, 'li');
        $this->registerArgument('entryLevel', 'integer', 'Optional entryLevel TS equivalent of the menu', false, 0);
        $this->registerArgument('levels', 'integer', 'Number of levels to render - setting this to a number higher than 1 (one) will expand menu ' . 'items that are active, to a depth of $levels starting from $entryLevel', false, 1);
        $this->registerArgument('expandAll', 'boolean', 'If TRUE and $levels > 1 then expands all (not just the active) menu items which have submenus', false, false);
        $this->registerArgument('classFirst', 'string', 'Optional class name for the first menu elment', false, '');
        $this->registerArgument('classLast', 'string', 'Optional class name for the last menu elment', false, '');
        $this->registerArgument('classActive', 'string', 'Optional class name to add to active links', false, 'active');
        $this->registerArgument('classCurrent', 'string', 'Optional class name to add to current link', false, 'current');
        $this->registerArgument('classHasSubpages', 'string', 'Optional class name to add to links which have subpages', false, 'sub');
        $this->registerArgument('substElementUid', 'boolean', 'Optional parameter for wrapping the link with the uid of the page', false, false);
        $this->registerArgument('showHiddenInMenu', 'boolean', 'Include pages that are set to be hidden in menus', false, false);
        $this->registerArgument('showCurrent', 'boolean', 'If FALSE, does not display the current page', false, true);
        $this->registerArgument('linkCurrent', 'boolean', 'If FALSE, does not wrap the current page in a link', false, true);
        $this->registerArgument('linkActive', 'boolean', 'If FALSE, does not wrap with links the titles of pages that are active in the rootline', false, true);
        $this->registerArgument('titleFields', 'string', 'CSV list of fields to use as link label - default is "nav_title,title", change to for example ' . '"tx_myext_somefield,subtitle,nav_title,title". The first field that contains text will be used. ' . 'Field value resolved AFTER page field overlays.', false, 'nav_title,title');
        $this->registerArgument('includeAnchorTitle', 'boolean', 'If TRUE, includes the page title as title attribute on the anchor.', false, true);
        $this->registerArgument('includeSpacers', 'boolean', 'Wether or not to include menu spacers in the page select query', false, false);
        $this->registerArgument('deferred', 'boolean', 'If TRUE, does not output the tag content UNLESS a v:page.menu.deferred child ViewHelper is both used ' . 'and triggered. This allows you to create advanced conditions while still using automatic rendering', false, false);
        $this->registerArgument('as', 'string', 'If used, stores the menu pages as an array in a variable named after this value and renders the tag ' . 'content. If the tag content is empty automatic rendering is triggered.', false, 'menu');
        $this->registerArgument('rootLineAs', 'string', 'If used, stores the menu root line as an array in a variable named according to this value and renders ' . 'the tag content - which means automatic rendering is disabled if this attribute is used', false, 'rootLine');
        $this->registerArgument('excludePages', 'mixed', 'Page UIDs to exclude from the menu. Can be CSV, array or an object implementing Traversable.', false, '');
        $this->registerArgument('forceAbsoluteUrl', 'boolean', 'If TRUE, the menu will be rendered with absolute URLs', false, false);
        $this->registerArgument('doktypes', 'mixed', 'DEPRECATED: Please use typical doktypes for starting points like shortcuts.', false, '');
        $this->registerArgument('divider', 'string', 'Optional divider to insert between each menu item. Note that this does not mix well with automatic ' . 'rendering due to the use of an ul > li structure');
    }

Usage Example

 /**
  * @return void
  */
 public function initializeArguments()
 {
     parent::initializeArguments();
     $this->registerArgument('pageUid', 'integer', 'Optional parent page UID to use as top level of menu. If left out will be detected from ' . 'rootLine using $entryLevel.');
     $this->registerArgument('endLevel', 'integer', 'Optional deepest level of rendering. If left out all levels up to the current are rendered.');
     $this->overrideArgument('as', 'string', 'If used, stores the menu pages as an array in a variable named after this value and renders the tag ' . 'content. If the tag content is empty automatic rendering is triggered.', false, 'breadcrumb');
 }
All Usage Examples Of FluidTYPO3\Vhs\ViewHelpers\Menu\AbstractMenuViewHelper::initializeArguments