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
$builder
Builder object.
protected
Builder
$builder
$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
CollectiongetOutputProperty()
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>|nullgetPage()
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
Return values
Page|nullgetPages()
Returns all pages, in the current language.
public
getPages() : Collection
Return values
CollectiongetPagesIntl()
Alias of getAllPages().
public
getPagesIntl() : Collection
Return values
CollectiongetTime()
Returns current time.
public
getTime() : int
Return values
intoffsetExists()
Implement 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
Tags
Attributes
- #[ReturnTypeWillChange]
offsetUnset()
Implements \ArrayAccess.
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
Tags
Attributes
- #[ReturnTypeWillChange]