PHP 클래스 yii\bootstrap\Dropdown

또한 보기: http://getbootstrap.com/javascript/#dropdowns
부터: 2.0
저자: Antonio Ramirez ([email protected])
상속: extends yii\bootstrap\Widget
파일 보기 프로젝트 열기: yiisoft/yii2-bootstrap 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$encodeLabels whether the labels for header items should be HTML-encoded.
$items list of menu items in the dropdown. Each array element can be either an HTML string, or an array representing a single menu with the following structure: - label: string, required, the label of the item link. - encode: boolean, optional, whether to HTML-ecnode item label. - url: string|array, optional, the url of the item link. This will be processed by [[Url::to()]]. If not set, the item will be treated as a menu header when the item has no sub-menu. - visible: boolean, optional, whether this menu item is visible. Defaults to true. - linkOptions: array, optional, the HTML attributes of the item link. - options: array, optional, the HTML attributes of the item. - items: array, optional, the submenu items. The structure is the same as this property. Note that Bootstrap doesn't support dropdown submenu. You have to add your own CSS styles to support it. - submenuOptions: array, optional, the HTML attributes for sub-menu container tag. If specified it will be merged with [[submenuOptions]]. To insert divider use .
$submenuOptions the HTML attributes for sub-menu container tags. If not set - [[options]] value will be used for it.

공개 메소드들

메소드 설명
init ( ) Initializes the widget.
run ( ) Renders the widget.

보호된 메소드들

메소드 설명
renderItems ( array $items, array $options = [] ) : string Renders menu items.

메소드 상세

init() 공개 메소드

If you override this method, make sure you call the parent implementation first.
public init ( )

renderItems() 보호된 메소드

Renders menu items.
protected renderItems ( array $items, array $options = [] ) : string
$items array the menu items to be rendered
$options array the container HTML attributes
리턴 string the rendering result.

run() 공개 메소드

Renders the widget.
public run ( )

프로퍼티 상세

$encodeLabels 공개적으로 프로퍼티

whether the labels for header items should be HTML-encoded.
public $encodeLabels

$items 공개적으로 프로퍼티

list of menu items in the dropdown. Each array element can be either an HTML string, or an array representing a single menu with the following structure: - label: string, required, the label of the item link. - encode: boolean, optional, whether to HTML-ecnode item label. - url: string|array, optional, the url of the item link. This will be processed by [[Url::to()]]. If not set, the item will be treated as a menu header when the item has no sub-menu. - visible: boolean, optional, whether this menu item is visible. Defaults to true. - linkOptions: array, optional, the HTML attributes of the item link. - options: array, optional, the HTML attributes of the item. - items: array, optional, the submenu items. The structure is the same as this property. Note that Bootstrap doesn't support dropdown submenu. You have to add your own CSS styles to support it. - submenuOptions: array, optional, the HTML attributes for sub-menu container tag. If specified it will be merged with [[submenuOptions]]. To insert divider use .
public $items

$submenuOptions 공개적으로 프로퍼티

the HTML attributes for sub-menu container tags. If not set - [[options]] value will be used for it.
부터: 2.0.5
public $submenuOptions