PHP Class Sulu\Bundle\AdminBundle\Navigation\NavigationItem

Contains the name and the coupled action for this specific NavigationItem.
Inheritance: implements Iterator
Afficher le fichier Open project: sulu/sulu Class Usage Examples

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
__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.

Méthodes protégées

Méthode Description
copyWithName ( ) : NavigationItem Create a new instance of current navigation item class.

Method Details

__construct() public méthode

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

addChild() public méthode

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

copyChildless() public méthode

Returns a copy of this navigation item without its children.
public copyChildless ( ) : NavigationItem
Résultat NavigationItem

copyWithName() protected méthode

Create a new instance of current navigation item class.
protected copyWithName ( ) : NavigationItem
Résultat NavigationItem

current() public méthode

Return the current element.
public current ( ) : mixed
Résultat mixed Can return any type

equalsChildless() public méthode

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
Résultat boolean True if the NavigationItems are equal, otherwise false

find() public méthode

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

findChildren() public méthode

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

getAction() public méthode

Returns the action of the NavigationItem.
public getAction ( ) : string
Résultat string

getChildren() public méthode

Returns all children from this navigation item.
public getChildren ( ) : array
Résultat array

getDisabled() public méthode

public getDisabled ( ) : boolean
Résultat boolean

getEvent() public méthode

public getEvent ( ) : string
Résultat string

getEventArguments() public méthode

public getEventArguments ( ) : string
Résultat string

getHasSettings() public méthode

public getHasSettings ( ) : boolean
Résultat boolean

getHeaderIcon() public méthode

Returns the icon of the header.
public getHeaderIcon ( ) : string
Résultat string

getHeaderTitle() public méthode

Returns the title of the header.
public getHeaderTitle ( ) : string
Résultat string The title of the header

getIcon() public méthode

Returns the action of the NavigationItem.
public getIcon ( ) : string
Résultat string

getId() public méthode

Returns the id of the NavigationItem.
public getId ( ) : string
Résultat string

getName() public méthode

Returns the name being displayed in the navigation.
public getName ( ) : string
Résultat string

getPosition() public méthode

public getPosition ( ) : integer
Résultat integer

hasChildren() public méthode

Checks if the NavigationItem has some children.
public hasChildren ( ) : boolean
Résultat boolean True if the item has children, otherwise false

key() public méthode

Return the key of the current element.
public key ( ) : mixed
Résultat mixed scalar on success, or null on failure

merge() public méthode

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
Résultat NavigationItem

next() public méthode

Move forward to next element.
public next ( )

rewind() public méthode

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

setAction() public méthode

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

setDisabled() public méthode

public setDisabled ( boolean $disabled )
$disabled boolean

setEvent() public méthode

public setEvent ( string $event )
$event string

setEventArguments() public méthode

public setEventArguments ( $eventArguments )

setHasSettings() public méthode

public setHasSettings ( boolean $hasSettings )
$hasSettings boolean

setHeaderIcon() public méthode

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

setHeaderTitle() public méthode

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

setIcon() public méthode

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

setId() public méthode

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

setName() public méthode

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

setPosition() public méthode

public setPosition ( integer $position )
$position integer

toArray() public méthode

Returns the content of the NavigationItem as array.
public toArray ( ) : array
Résultat array

valid() public méthode

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

Property Details

$action protected_oe property

The action which should be executed when clicking on this NavigationItem.
protected string $action
Résultat string

$children protected_oe property

Contains the children of this item, which are other NavigationItems.
protected array $children
Résultat array

$disabled protected_oe property

Defines if item is disabled.
protected bool $disabled
Résultat boolean

$displayOption protected_oe property

Describes how the navigation item should be shown in husky.
protected string $displayOption
Résultat string

$hasSettings protected_oe property

Defines if this menu item has settings.
protected bool $hasSettings
Résultat boolean

$headerIcon protected_oe property

The icon of the header are of the NavigationItem.
protected string $headerIcon
Résultat string

$headerTitle protected_oe property

The title of the head area of the NavigationItem.
protected string $headerTitle
Résultat string

$icon protected_oe property

The icon of the navigationItem.
protected string $icon
Résultat string

$id protected_oe property

The id of the NavigationItem.
protected string $id
Résultat string

$name protected_oe property

The name being displayed in the navigation.
protected string $name
Résultat string

$position protected_oe property

The current position of the iterator.
protected int $position
Résultat integer