PHP 클래스 Sulu\Bundle\AdminBundle\Navigation\NavigationItem

Contains the name and the coupled action for this specific NavigationItem.
상속: implements Iterator
파일 보기 프로젝트 열기: sulu/sulu 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$action string The action which should be executed when clicking on this NavigationItem.
$children array Contains the children of this item, which are other NavigationItems.
$disabled boolean Defines if item is disabled.
$displayOption string Describes how the navigation item should be shown in husky.
$hasSettings boolean Defines if this menu item has settings.
$headerIcon string The icon of the header are of the NavigationItem.
$headerTitle string The title of the head area of the NavigationItem.
$icon string The icon of the navigationItem.
$id string The id of the NavigationItem.
$name string The name being displayed in the navigation.
$position integer The current position of the iterator.

공개 메소드들

메소드 설명
__construct ( string $name, NavigationItem $parent = null )
addChild ( NavigationItem $child ) Adds a child to the navigation item.
copyChildless ( ) : NavigationItem Returns a copy of this navigation item without its children.
current ( ) : mixed Return the current element.
equalsChildless ( NavigationItem $other ) : boolean Compares this item with another one, but doesn't check the children.
find ( NavigationItem $navigationItem ) : NavigationItem Searches for the equivalent of a specific NavigationItem.
findChildren ( NavigationItem $navigationItem ) : NavigationItem | null Searches for a specific NavigationItem in the children of this NavigationItem.
getAction ( ) : string Returns the action of the NavigationItem.
getChildren ( ) : array Returns all children from this navigation item.
getDisabled ( ) : boolean
getEvent ( ) : string
getEventArguments ( ) : string
getHasSettings ( ) : boolean
getHeaderIcon ( ) : string Returns the icon of the header.
getHeaderTitle ( ) : string Returns the title of the header.
getIcon ( ) : string Returns the action of the NavigationItem.
getId ( ) : string Returns the id of the NavigationItem.
getName ( ) : string Returns the name being displayed in the navigation.
getPosition ( ) : integer
hasChildren ( ) : boolean Checks if the NavigationItem has some children.
key ( ) : mixed Return the key of the current element.
merge ( NavigationItem $other = null ) : NavigationItem Merges this navigation item with the other parameter and returns a new NavigationItem.
next ( ) Move forward to next element.
rewind ( ) Rewind the Iterator to the first element.
setAction ( string $action ) Sets the action of the NavigationItem.
setDisabled ( boolean $disabled )
setEvent ( string $event )
setEventArguments ( $eventArguments )
setHasSettings ( boolean $hasSettings )
setHeaderIcon ( string $headerIcon ) Sets the icon of the header.
setHeaderTitle ( string $headerTitle ) Sets the title of the header.
setIcon ( string $icon ) Set the icon of the NavigaitonItem.
setId ( string $id ) Sets the id of the NavigationItem.
setName ( string $name ) Sets the name being displayed in the navigation.
setPosition ( integer $position )
toArray ( ) : array Returns the content of the NavigationItem as array.
valid ( ) : boolean Checks if current position is valid.

보호된 메소드들

메소드 설명
copyWithName ( ) : NavigationItem Create a new instance of current navigation item class.

메소드 상세

__construct() 공개 메소드

public __construct ( string $name, NavigationItem $parent = null )
$name string The name of the item
$parent NavigationItem The parent of the item

addChild() 공개 메소드

Adds a child to the navigation item.
public addChild ( NavigationItem $child )
$child NavigationItem

copyChildless() 공개 메소드

Returns a copy of this navigation item without its children.
public copyChildless ( ) : NavigationItem
리턴 NavigationItem

copyWithName() 보호된 메소드

Create a new instance of current navigation item class.
protected copyWithName ( ) : NavigationItem
리턴 NavigationItem

current() 공개 메소드

Return the current element.
public current ( ) : mixed
리턴 mixed Can return any type

equalsChildless() 공개 메소드

Compares this item with another one, but doesn't check the children.
public equalsChildless ( NavigationItem $other ) : boolean
$other NavigationItem The other NavigationItem of the comparison
리턴 boolean True if the NavigationItems are equal, otherwise false

find() 공개 메소드

Searches for the equivalent of a specific NavigationItem.
public find ( NavigationItem $navigationItem ) : NavigationItem
$navigationItem NavigationItem The NavigationItem to look for
리턴 NavigationItem The item if it is found, otherwise false

findChildren() 공개 메소드

Searches for a specific NavigationItem in the children of this NavigationItem.
public findChildren ( NavigationItem $navigationItem ) : NavigationItem | null
$navigationItem NavigationItem The navigationItem we look for
리턴 NavigationItem | null Null if the NavigationItem is not found, otherwise the found NavigationItem

getAction() 공개 메소드

Returns the action of the NavigationItem.
public getAction ( ) : string
리턴 string

getChildren() 공개 메소드

Returns all children from this navigation item.
public getChildren ( ) : array
리턴 array

getDisabled() 공개 메소드

public getDisabled ( ) : boolean
리턴 boolean

getEvent() 공개 메소드

public getEvent ( ) : string
리턴 string

getEventArguments() 공개 메소드

public getEventArguments ( ) : string
리턴 string

getHasSettings() 공개 메소드

public getHasSettings ( ) : boolean
리턴 boolean

getHeaderIcon() 공개 메소드

Returns the icon of the header.
public getHeaderIcon ( ) : string
리턴 string

getHeaderTitle() 공개 메소드

Returns the title of the header.
public getHeaderTitle ( ) : string
리턴 string The title of the header

getIcon() 공개 메소드

Returns the action of the NavigationItem.
public getIcon ( ) : string
리턴 string

getId() 공개 메소드

Returns the id of the NavigationItem.
public getId ( ) : string
리턴 string

getName() 공개 메소드

Returns the name being displayed in the navigation.
public getName ( ) : string
리턴 string

getPosition() 공개 메소드

public getPosition ( ) : integer
리턴 integer

hasChildren() 공개 메소드

Checks if the NavigationItem has some children.
public hasChildren ( ) : boolean
리턴 boolean True if the item has children, otherwise false

key() 공개 메소드

Return the key of the current element.
public key ( ) : mixed
리턴 mixed scalar on success, or null on failure

merge() 공개 메소드

Works only if there are no duplicate values on one level.
public merge ( NavigationItem $other = null ) : NavigationItem
$other NavigationItem The navigation item this one should be merged with
리턴 NavigationItem

next() 공개 메소드

Move forward to next element.
public next ( )

rewind() 공개 메소드

Rewind the Iterator to the first element.
public rewind ( )

setAction() 공개 메소드

Sets the action of the NavigationItem.
public setAction ( string $action )
$action string The action of the NavigationItem

setDisabled() 공개 메소드

public setDisabled ( boolean $disabled )
$disabled boolean

setEvent() 공개 메소드

public setEvent ( string $event )
$event string

setEventArguments() 공개 메소드

public setEventArguments ( $eventArguments )

setHasSettings() 공개 메소드

public setHasSettings ( boolean $hasSettings )
$hasSettings boolean

setHeaderIcon() 공개 메소드

Sets the icon of the header.
public setHeaderIcon ( string $headerIcon )
$headerIcon string

setHeaderTitle() 공개 메소드

Sets the title of the header.
public setHeaderTitle ( string $headerTitle )
$headerTitle string The title of the header

setIcon() 공개 메소드

Set the icon of the NavigaitonItem.
public setIcon ( string $icon )
$icon string The icon of the NavigationItem

setId() 공개 메소드

Sets the id of the NavigationItem.
public setId ( string $id )
$id string

setName() 공개 메소드

Sets the name being displayed in the navigation.
public setName ( string $name )
$name string The name being displayed in the navigation

setPosition() 공개 메소드

public setPosition ( integer $position )
$position integer

toArray() 공개 메소드

Returns the content of the NavigationItem as array.
public toArray ( ) : array
리턴 array

valid() 공개 메소드

Checks if current position is valid.
public valid ( ) : boolean
리턴 boolean The return value will be casted to boolean and then evaluated. Returns true on success or false on failure

프로퍼티 상세

$action 보호되어 있는 프로퍼티

The action which should be executed when clicking on this NavigationItem.
protected string $action
리턴 string

$children 보호되어 있는 프로퍼티

Contains the children of this item, which are other NavigationItems.
protected array $children
리턴 array

$disabled 보호되어 있는 프로퍼티

Defines if item is disabled.
protected bool $disabled
리턴 boolean

$displayOption 보호되어 있는 프로퍼티

Describes how the navigation item should be shown in husky.
protected string $displayOption
리턴 string

$hasSettings 보호되어 있는 프로퍼티

Defines if this menu item has settings.
protected bool $hasSettings
리턴 boolean

$headerIcon 보호되어 있는 프로퍼티

The icon of the header are of the NavigationItem.
protected string $headerIcon
리턴 string

$headerTitle 보호되어 있는 프로퍼티

The title of the head area of the NavigationItem.
protected string $headerTitle
리턴 string

$icon 보호되어 있는 프로퍼티

The icon of the navigationItem.
protected string $icon
리턴 string

$id 보호되어 있는 프로퍼티

The id of the NavigationItem.
protected string $id
리턴 string

$name 보호되어 있는 프로퍼티

The name being displayed in the navigation.
protected string $name
리턴 string

$position 보호되어 있는 프로퍼티

The current position of the iterator.
protected int $position
리턴 integer