Class

eZNamePatternResolver

class eZNamePatternResolver

eZNamePatternResolver is a utility class for resolving object name and url alias patterns.

This code supports object name pattern groups.

Syntax: <attributeidentifier> <attributeidentifier> <2nd-identifier> User text <attribute_identifier>|(<2nd-identifier><3rd-identifier>)

Example: <nickname|(<firstname> <lastname>)>

Tokens are looked up from left to right. If a match is found for the leftmost token, the 2nd token will not be used. Tokens are representations of attributes. So a match means that that the current attribute has data.

tokens are the class attribute identifiers which are used in the class edit-interface.

Constants

FIELD_NAME_MAX_SIZE

Methods

__construct(string $namePattern, eZContentObject $contentObject, int|false $contentVersion = false, string|false $contentTranslation = false)

Constructs a object to resolve $namePattern.

string resolveNamePattern(int $limit, string $sequence = '')

Return the real name for an object name pattern

Details

at line 110
public __construct(string $namePattern, eZContentObject $contentObject, int|false $contentVersion = false, string|false $contentTranslation = false)

Constructs a object to resolve $namePattern.

$contentVersion and $contentTranslation specify which version and translation respectively of the content object to use.

Parameters

string $namePattern
eZContentObject $contentObject
int|false $contentVersion
string|false $contentTranslation

at line 127
public string resolveNamePattern(int $limit, string $sequence = '')

Return the real name for an object name pattern

Parameters

int $limit The limit on the string length, by defaul 0 aka none
string $sequence End sequence applied to string if limit has been reached

Return Value

string