Cecil

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
string

getName()

Get menu entry name.

public getName() : string|null
Return values
string|null

getUrl()

Get menu entry URL.

public getUrl() : string|null
Return values
string|null

getWeight()

Get menu entry weight.

public getWeight() : int|null
Return values
int|null

offsetExists()

Implements \ArrayAccess.

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Attributes
#[ReturnTypeWillChange]
Return values
bool

offsetGet()

Implements \ArrayAccess.

public offsetGet(mixed $offset) : mixed|null
Parameters
$offset : mixed
Attributes
#[ReturnTypeWillChange]
Return values
mixed|null

offsetSet()

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]

setName()

Set the menu entry name.

public setName(string $value) : self
Parameters
$value : string
Return values
self

setUrl()

Set the menu entry URL.

public setUrl([string|null $value = null ]) : self
Parameters
$value : string|null = null
Return values
self

setWeight()

Set menu entry weight.

public setWeight(int $value) : self
Parameters
$value : int
Return values
self

toArray()

Returns properties as array.

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>
 
On this page

Search results