Documentation

LinkGenerator
in package

Handles the node-Url placeholders: [[ NODE_(<node_id>|<module>[_<cmd>])[_<lang_id>] ]]

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

CLOUDREXX Development Team info@cloudrexx.com

subpackage

core

Table of Contents

Properties

$absoluteUris  : mixed
$domain  : mixed
$fetchingDone  : bool
$placeholders  : array<string|int, mixed>
array ( placeholder_name => placeholder_link

Methods

__construct()  : mixed
fetch()  : mixed
Uses the given Entity Manager to retrieve all links for the placeholders
getPlaceholders()  : mixed
parseTemplate()  : mixed
Replace all occurrences of node-placeholders (NODE_...) by their URL-representation.
replaceIn()  : mixed
Replaces all variables in the given string
scan()  : mixed
Scans the given string for placeholders and remembers them

Properties

$placeholders

array ( placeholder_name => placeholder_link

protected array<string|int, mixed> $placeholders = array()

stores the placeholders found by scan()

Methods

__construct()

public __construct([mixed $absoluteUris = false ][, mixed $domain = null ]) : mixed
Parameters
$absoluteUris : mixed = false
$domain : mixed = null

fetch()

Uses the given Entity Manager to retrieve all links for the placeholders

public fetch(EntityManager $em) : mixed
Parameters
$em : EntityManager

parseTemplate()

Replace all occurrences of node-placeholders (NODE_...) by their URL-representation.

public static parseTemplate(mixed &$content[, bool $absoluteUris = false ][, Domain $domain = null ]) : mixed
Parameters
$content : mixed

Either a string or an array of strings in which the node-placeholders shall be replaced by their URL-representation.

$absoluteUris : bool = false

Set to TRUE to replace the node-placeholders by absolute URLs.

$domain : Domain = null

Set the domain that shall be used when absolute URLs shall be generated.

replaceIn()

Replaces all variables in the given string

public replaceIn(mixed &$string) : mixed
Parameters
$string : mixed

scan()

Scans the given string for placeholders and remembers them

public scan(string &$content) : mixed
Parameters
$content : string

        
On this page

Search results