DropdownModule::__construct PHP Method

__construct() public method

Constructor.
public __construct ( string $triggerId = 'dropdown', string $triggerText = '', string $cssClass = '', string $listCssClass = '', boolean $useCssPrefix = true )
$triggerId string The html id value of the trigger tag. Needs to be unique.
$triggerText string Text on the trigger.
$cssClass string A potential CSS class of the dropdown menu wrapper container.
$listCssClass string A potential CSS class of the list
    block.
$useCssPrefix boolean Whether to use CSS prefixes on the dropmenu items.
    public function __construct($triggerId = 'dropdown', $triggerText = '', $cssClass = '', $listCssClass = '', $useCssPrefix = true)
    {
        parent::__construct();
        $this->flatten = true;
        $this->useCssPrefix = $useCssPrefix;
        $this->triggerId = $triggerId;
        $this->trigger['text'] = $triggerText;
        $this->cssClass = $cssClass;
        $this->listCssClass = trim($listCssClass);
        if ($useCssPrefix) {
            $this->headerCssClassPrefix = 'dropdown-header';
            $this->linkCssClassPrefix = 'dropdown-menu-link';
            $this->dividerCssClassPrefix = 'divider';
        }
    }