Entry extends Item
Menu entry class. Represents a menu entry in a collection, providing methods to set and get the entry's name, URL, and weight.
Table of Contents
Properties
- $id : string
- Item's identifier.
- $properties : array<string|int, mixed>
- Item's properties.
Methods
- __construct() : mixed
- getId() : string
- Returns the item's identifier.
- getName() : string|null
- Get menu entry name.
- getUrl() : string|null
- Get menu entry URL.
- getWeight() : int|null
- Get menu entry weight.
- offsetExists() : bool
- Implements \ArrayAccess.
- offsetGet() : mixed|null
- Implements \ArrayAccess.
- offsetSet() : void
- Implements \ArrayAccess.
- offsetUnset() : void
- Implements \ArrayAccess.
- setId() : BaseInterface
- Set the item's identifier.
- setName() : self
- Set the menu entry name.
- setUrl() : self
- Set the menu entry URL.
- setWeight() : self
- Set menu entry weight.
- toArray() : array<string|int, mixed>
- Returns properties as array.
Properties
$id
Item's identifier.
protected
string
$id
$properties
Item's properties.
protected
array<string|int, mixed>
$properties
= []
Methods
__construct()
public
__construct(string $id) : mixed
Parameters
- $id : string
getId()
Returns the item's identifier.
public
getId() : string
Return values
stringgetName()
Get menu entry name.
public
getName() : string|null
Return values
string|nullgetUrl()
Get menu entry URL.
public
getUrl() : string|null
Return values
string|nullgetWeight()
Get menu entry weight.
public
getWeight() : int|null
Return values
int|nulloffsetExists()
Implements \ArrayAccess.
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Attributes
- #[ReturnTypeWillChange]
Return values
booloffsetGet()
Implements \ArrayAccess.
public
offsetGet(mixed $offset) : mixed|null
Parameters
- $offset : mixed
Attributes
- #[ReturnTypeWillChange]
Return values
mixed|nulloffsetSet()
Implements \ArrayAccess.
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
Attributes
- #[ReturnTypeWillChange]
offsetUnset()
Implements \ArrayAccess.
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
Attributes
- #[ReturnTypeWillChange]
setId()
Set the item's identifier.
public
setId(string $id) : BaseInterface
Parameters
- $id : string
Return values
BaseInterfacesetName()
Set the menu entry name.
public
setName(string $value) : self
Parameters
- $value : string
Return values
selfsetUrl()
Set the menu entry URL.
public
setUrl([string|null $value = null ]) : self
Parameters
- $value : string|null = null
Return values
selfsetWeight()
Set menu entry weight.
public
setWeight(int $value) : self
Parameters
- $value : int
Return values
selftoArray()
Returns properties as array.
public
toArray() : array<string|int, mixed>