Cecil

Url

URL class.

Builds an URL from a Page, a Menu Entry, an Asset or a string.

Table of Contents

Properties

$builder  : Builder
$config  : Config
$url  : string
$slugifier  : Page

Methods

__construct()  : mixed
Creates an URL from a Page, a Menu Entry, an Asset or a string.
__toString()  : string
If called like a string returns built URL.
getUrl()  : string
Returns built URL.

Properties

$url

protected string $url

$slugifier

private static Page $slugifier

Slugifier

Methods

__construct()

Creates an URL from a Page, a Menu Entry, an Asset or a string.

public __construct(Builder $builder, Page|Entry|Asset|string|null $value[, array<string|int, mixed>|null $options = null ]) : mixed
Parameters
$builder : Builder
$value : Page|Entry|Asset|string|null
$options : array<string|int, mixed>|null = null

Rendering options, e.g.: ['canonical' => true, 'format' => 'html', 'language' => 'fr']

__toString()

If called like a string returns built URL.

public __toString() : string
Return values
string

getUrl()

Returns built URL.

public getUrl() : string
Return values
string
 
On this page

Search results