public addDropdownIf ( boolean | string | array $isAllowed = true, DropdownModule $dropdown, string $key = '', string $cssClass = '', array | integer $sort = [] ) : NavModule | ||
$isAllowed | boolean | string | array | Either a boolean to indicate whether to actually add the item or a permission string or array of permission strings (full match) to check. |
$dropdown | DropdownModule | The dropdown menu to add. |
$key | string | The item's key (for sorting and CSS targeting). |
$cssClass | string | The dropdown wrapper's CSS class. |
$sort | array | integer | Either a numeric sort position or and array in the style: array('before|after', 'key'). |
Результат | NavModule | $this The calling object. |