Cecil

Site implements ArrayAccess

Site renderer class.

This class implements the \ArrayAccess interface to allow access to site properties using array syntax. It provides access to various site-related properties such as pages, menus, taxonomies, and language settings. It also provides methods to retrieve specific pages and collections of pages based on the current language or all pages regardless of their translation.

Table of Contents

Interfaces

ArrayAccess

Properties

$builder  : Builder
Builder object.
$config  : Config
Configuration object.
$language  : string
Current language code.

Methods

__construct()  : mixed
getAllPages()  : Collection
Returns all pages, regardless of their translation.
getOutputProperty()  : string|array<string|int, mixed>|null
Returns the property value(s) of an output format.
getPage()  : Page|null
Returns a page for the provided language or the current one provided.
getPages()  : Collection
Returns all pages, in the current language.
getPagesIntl()  : Collection
Alias of getAllPages().
getTime()  : int
Returns current time.
offsetExists()  : bool
Implement ArrayAccess.
offsetGet()  : mixed|null
Implements \ArrayAccess.
offsetSet()  : void
Implements \ArrayAccess.
offsetUnset()  : void
Implements \ArrayAccess.

Properties

$config

Configuration object.

protected Config $config

$language

Current language code.

protected string $language

Methods

__construct()

public __construct(Builder $builder, string $language) : mixed
Parameters
$builder : Builder
$language : string

getAllPages()

Returns all pages, regardless of their translation.

public getAllPages() : Collection
Return values
Collection

getOutputProperty()

Returns the property value(s) of an output format.

public getOutputProperty(string $name, string $property) : string|array<string|int, mixed>|null
Parameters
$name : string
$property : string
Return values
string|array<string|int, mixed>|null

getPage()

Returns a page for the provided language or the current one provided.

public getPage(string $id[, string|null $language = null ]) : Page|null
Parameters
$id : string
$language : string|null = null
Tags
throws
DomainException
Return values
Page|null

getTime()

Returns current time.

public getTime() : int
Return values
int

offsetExists()

Implement 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
Tags
SuppressWarnings

(PHPMD.UnusedFormalParameter)

Attributes
#[ReturnTypeWillChange]

offsetUnset()

Implements \ArrayAccess.

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed
Tags
SuppressWarnings

(PHPMD.UnusedFormalParameter)

Attributes
#[ReturnTypeWillChange]
 
On this page

Search results