FormPersistenceIdentifierSoftReferenceParser extends AbstractSoftReferenceParser

Register new referenced formDefinitions within a plugin as a soft reference.

This is used in BE to track how often a specific form is used in a content element. The number is shown in the form module "Manage forms".

Scope: backend

Internal

Table of Contents

Properties

$parameters  : array<string|int, mixed>
$parserKey  : string
$tokenID_basePrefix  : string

Methods

getParserKey()  : string
Returns the parser key, which was previously set by "setParserKey"
makeTokenID()  : string
Make Token ID for input index.
parse()  : SoftReferenceParserResult
Main function through which can parse content for a specific field.
setParserKey()  : void
The two properties parserKey and parameters may be set to generate a unique token ID from them.
resolveRecordLinkTable()  : string
Resolves the database table of a record link (t3://record?identifier=...). The identifier is mapped to a table via the link handler configuration of the page TSconfig of the referencing record, otherwise the identifier is used as table name (behaviour before the mapping existed).
setTokenIdBasePrefix()  : void

Properties

$parameters

protected array<string|int, mixed> $parameters = []

$parserKey

protected string $parserKey = ''

$tokenID_basePrefix

protected string $tokenID_basePrefix = ''

Methods

getParserKey()

Returns the parser key, which was previously set by "setParserKey"

public getParserKey() : string
Return values
string

makeTokenID()

Make Token ID for input index.

public makeTokenID([string $index = '' ]) : string
Parameters
$index : string = ''

Suffix value.

Return values
string —

Token ID

parse()

Main function through which can parse content for a specific field.

public parse(string $table, string $field, int $uid, string $content[, string $structurePath = '' ]) : SoftReferenceParserResult
Parameters
$table : string

Database table name

$field : string

Field name for which processing occurs

$uid : int

UID of the record

$content : string

The content/value of the field

$structurePath : string = ''

If running from inside a FlexForm structure, this is the path of the tag.

Return values
SoftReferenceParserResult —

Result object on positive matches, see description above.

setParserKey()

The two properties parserKey and parameters may be set to generate a unique token ID from them.

public setParserKey(string $parserKey, array<string|int, mixed> $parameters) : void
Parameters
$parserKey : string

The softref parser key.

$parameters : array<string|int, mixed>

Parameters of the softlink parser. Basically this is the content inside optional []-brackets after the softref keys. Parameters are exploded by ";

resolveRecordLinkTable()

Resolves the database table of a record link (t3://record?identifier=...). The identifier is mapped to a table via the link handler configuration of the page TSconfig of the referencing record, otherwise the identifier is used as table name (behaviour before the mapping existed).

protected resolveRecordLinkTable(string $identifier, string $referenceTable, int $referenceUid) : string
Parameters
$identifier : string
$referenceTable : string
$referenceUid : int
Return values
string

setTokenIdBasePrefix()

protected setTokenIdBasePrefix(string $table, string $uid, string $field, string $structurePath) : void
Parameters
$table : string
$uid : string
$field : string
$structurePath : string
On this page

Search results