PHP Класс Sulu\Bundle\AdminBundle\Navigation\NavigationItem

Contains the name and the coupled action for this specific NavigationItem.
Наследование: implements Iterator
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$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