<attribute_identifier>
<attribute_identifier> <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 fields. So a match means that that the current field has data.
Tokens are the field definition identifiers which are used in the class edit-interface.
Show file
Open project: ezsystems/ezpublish-kernel
Class Usage Examples
Property | Type | Description | |
---|---|---|---|
$contentTypeDomainMapper | |||
$contentTypeHandler | eZ\Publish\SPI\Persistence\Content\Type\Handler | ||
$nameableFieldTypeRegistry | |||
$settings | array |
Method | Description | |
---|---|---|
__construct ( eZ\Publish\SPI\Persistence\Content\Type\Handler $contentTypeHandler, |
Constructs a object to resolve $nameSchema with $contentVersion fields values. | |
resolve ( string $nameSchema, eZ\Publish\SPI\Persistence\Content\Type | eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, array $fieldMap, array $languageCodes ) : string | Returns the real name for a content name pattern. | |
resolveNameSchema ( eZ\Publish\API\Repository\Values\Content\Content $content, array $fieldMap = [], array $languageCodes = [], eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType = null ) : array | Convenience method for resolving name schema. | |
resolveUrlAliasSchema ( eZ\Publish\API\Repository\Values\Content\Content $content, eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType = null ) : array | Convenience method for resolving URL alias schema. |
Method | Description | |
---|---|---|
extractTokens ( string $nameSchema ) : array | Extract all tokens from $namePattern. | |
filterNameSchema ( string $nameSchema ) : string | Builds a lookup / translation table for groups in the $namePattern. | |
getFieldTitles ( array $schemaIdentifiers, eZ\Publish\SPI\Persistence\Content\Type | eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, array $fieldMap, string $languageCode ) : string[] | Fetches the list of available Field identifiers in the token and returns an array of their current title value. | |
getIdentifiers ( string $schemaString ) : array | Returns all identifiers from all tokens in the name schema. | |
isTokenGroup ( string $identifier ) : boolean | Checks whether $identifier is a placeholder for a token group. | |
mergeFieldMap ( eZ\Publish\API\Repository\Values\Content\Content $content, array $fieldMap, array $languageCodes ) : array | Convenience method for resolving name schema. | |
resolveToken ( string $token, array $titles, array $groupLookupTable ) : string | Looks up the value $token should be replaced with and returns this as a string. Meta strings denoting token groups are automatically inferred. | |
tokenParts ( string $token ) : array | Returns the different constituents of $token in an array. |
public __construct ( eZ\Publish\SPI\Persistence\Content\Type\Handler $contentTypeHandler, |
||
$contentTypeHandler | eZ\Publish\SPI\Persistence\Content\Type\Handler | |
$contentTypeDomainMapper | ||
$nameableFieldTypeRegistry | ||
$settings | array |
Text <token> more text ==> <token>
protected extractTokens ( string $nameSchema ) : array | ||
$nameSchema | string | |
return | array |
protected filterNameSchema ( string $nameSchema ) : string | ||
$nameSchema | string | |
return | string |
protected getFieldTitles ( array $schemaIdentifiers, eZ\Publish\SPI\Persistence\Content\Type | eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, array $fieldMap, string $languageCode ) : string[] | ||
$schemaIdentifiers | array | |
$contentType | eZ\Publish\SPI\Persistence\Content\Type | eZ\Publish\API\Repository\Values\ContentType\ContentType | |
$fieldMap | array | |
$languageCode | string | |
return | string[] | Key is the field identifier, value is the title value |
protected getIdentifiers ( string $schemaString ) : array | ||
$schemaString | string | |
return | array |
protected isTokenGroup ( string $identifier ) : boolean | ||
$identifier | string | |
return | boolean |
public resolve ( string $nameSchema, eZ\Publish\SPI\Persistence\Content\Type | eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType, array $fieldMap, array $languageCodes ) : string | ||
$nameSchema | string | |
$contentType | eZ\Publish\SPI\Persistence\Content\Type | eZ\Publish\API\Repository\Values\ContentType\ContentType | |
$fieldMap | array | |
$languageCodes | array | |
return | string |
public resolveNameSchema ( eZ\Publish\API\Repository\Values\Content\Content $content, array $fieldMap = [], array $languageCodes = [], eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType = null ) : array | ||
$content | eZ\Publish\API\Repository\Values\Content\Content | |
$fieldMap | array | |
$languageCodes | array | |
$contentType | eZ\Publish\API\Repository\Values\ContentType\ContentType | |
return | array |
public resolveUrlAliasSchema ( eZ\Publish\API\Repository\Values\Content\Content $content, eZ\Publish\API\Repository\Values\ContentType\ContentType $contentType = null ) : array | ||
$content | eZ\Publish\API\Repository\Values\Content\Content | |
$contentType | eZ\Publish\API\Repository\Values\ContentType\ContentType | |
return | array |
"<title|text>" ==> array( 'title', 'text' )
protected tokenParts ( string $token ) : array | ||
$token | string | |
return | array |
protected ContentTypeDomainMapper,eZ\Publish\Core\Repository\Helper $contentTypeDomainMapper | ||
return |
protected Handler,eZ\Publish\SPI\Persistence\Content\Type $contentTypeHandler | ||
return | eZ\Publish\SPI\Persistence\Content\Type\Handler |
protected NameableFieldTypeRegistry,eZ\Publish\Core\Repository\Helper $nameableFieldTypeRegistry | ||
return |