PHP 클래스 NavModule, vanilla

The module contains an array of items. Each item can be one of the following types: link, group, or divider. When adding an item you provide an array of with the following keys.
상속: extends Gdn_Module
파일 보기 프로젝트 열기: vanilla/vanilla 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$cssClass A potential CSS class of the nav wrapper container.

공개 메소드들

메소드 설명
__construct ( string $cssClass = '', boolean $useCssPrefix = true )
addDropdown ( DropdownModule $dropdown, string $key = '', string $cssClass = '', array | integer $sort = [] ) : NavModule Add a dropdown menu to the items array.
addDropdownIf ( boolean | string | array $isAllowed = true, DropdownModule $dropdown, string $key = '', string $cssClass = '', array | integer $sort = [] ) : NavModule Add a dropdown to the items array if it satisfies the $isAllowed condition.
toString ( )

메소드 상세

__construct() 공개 메소드

public __construct ( string $cssClass = '', boolean $useCssPrefix = true )
$cssClass string A potential CSS class of the dropdown menu wrapper container.
$useCssPrefix boolean Whether to use CSS prefixes on the nav items.

addDropdown() 공개 메소드

Add a dropdown menu to the items array.
public addDropdown ( DropdownModule $dropdown, string $key = '', string $cssClass = '', array | integer $sort = [] ) : NavModule
$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.

addDropdownIf() 공개 메소드

Add a dropdown to the items array if it satisfies the $isAllowed condition.
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.

toString() 공개 메소드

public toString ( )

프로퍼티 상세

$cssClass 공개적으로 프로퍼티

A potential CSS class of the nav wrapper container.
public $cssClass