프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$activateItems | whether to automatically activate items according to whether their route setting matches the currently requested route. | ||
$activateParents | whether to activate parent menu items when one of the corresponding child menu items is active. | ||
$dropDownCaret | this property allows you to customize the HTML which is used to generate the drop down caret symbol, which is displayed next to the button text to indicate the drop down functionality. Defaults to null which means will be used. To disable the caret, set this property to be an empty string. | ||
$dropdownClass | name of a class to use for rendering dropdowns withing this widget. Defaults to Dropdown. | ||
$encodeLabels | whether the nav items labels should be HTML-encoded. | ||
$items | list of items in the nav widget. Each array element represents a single menu item which can be either a string or an array with the following structure: - label: string, required, the nav item label. - url: optional, the item's URL. Defaults to "#". - visible: boolean, optional, whether this menu item is visible. Defaults to true. - linkOptions: array, optional, the HTML attributes of the item's link. - options: array, optional, the HTML attributes of the item container (LI). - active: boolean, optional, whether the item should be on active state or not. - dropDownOptions: array, optional, the HTML options that will passed to the Dropdown widget. - items: array|string, optional, the configuration array for creating a Dropdown widget, or a string representing the dropdown menu. Note that Bootstrap does not support sub-dropdown menus. - encode: boolean, optional, whether the label will be HTML-encoded. If set, supersedes the $encodeLabels option for only this item. If a menu item is a string, it will be rendered directly without HTML encoding. | ||
$params | the parameters used to determine if a menu item is active or not. If not set, it will use $_GET. | ||
$route | the route used to determine if a menu item is active or not. If not set, it will use the route of the current request. |
메소드 | 설명 | |
---|---|---|
init ( ) | Initializes the widget. | |
renderItem ( string | array $item ) : string | Renders a widget's item. | |
renderItems ( ) | Renders widget items. | |
run ( ) | Renders the widget. |
메소드 | 설명 | |
---|---|---|
isChildActive ( array $items, boolean &$active ) : array | Check to see if a child item is active optionally activating the parent. | |
isItemActive ( array $item ) : boolean | Checks whether a menu item is active. | |
renderDropdown ( array $items, array $parentItem ) : string | Renders the given items as a dropdown. |
protected isItemActive ( array $item ) : boolean | ||
$item | array | the menu item to be checked |
리턴 | boolean | whether the menu item is active |
public $activateItems |
public $activateParents |
public $dropDownCaret |
public $dropdownClass |
public $items |
public $params |