RecordLinktype extends AbstractLinktype

FinalYes

This class checks links to database records using the record link handler, for example:

  • t3://record?identifier=tx_news&uid=99999

The table of the record is taken from the result of the configured soft reference parsers, which resolve the link identifier via the "TCEMAIN.linkHandler" page TSconfig.

Only the database record is checked. It is neither verified that a public URL can be generated for it, for example via a detail page, nor that this URL can be fetched.

Internal

Table of Contents

Constants

DELETED  : mixed = 'deleted'
HIDDEN  : mixed = 'hidden'
NOTEXISTING  : mixed = 'notExisting'
TABLENOTEXISTING  : mixed = 'tableNotExisting'

Properties

$errorParams  : array<string|int, mixed>
Contains parameters needed for the rendering of the error message
$identifier  : string

Methods

__construct()  : mixed
checkLink()  : bool
Checks a given record link. The soft reference entry typically contains:
fetchType()  : string
Type fetching method, based on the type that softRefParserObj returns.
getBrokenUrl()  : string
Construct a valid Url for browser output
getErrorMessage()  : string
Generates the localized error message from the error params saved from the parsing
getErrorParams()  : array<string|int, mixed>
Get the value of the private property errorParams
getIdentifier()  : string
Returns the unique identifier of the linktype
getReadableName()  : string
Get localized label for this linktype to be displayed in Backend user interface.
setAdditionalConfig()  : void
Function to override config of Linktype. Should be used only if necessary. Add additional configuration to TSconfig.
getLanguageService()  : LanguageService
setErrorParams()  : mixed
Set the value of the protected property errorParams

Constants

NOTEXISTING

public mixed NOTEXISTING = 'notExisting'

TABLENOTEXISTING

public mixed TABLENOTEXISTING = 'tableNotExisting'

Properties

$errorParams

Contains parameters needed for the rendering of the error message

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

$identifier

protected string $identifier = 'record'

Methods

Checks a given record link. The soft reference entry typically contains:

public checkLink(string $url, array<string|int, mixed> $softRefEntry, LinkAnalyzer $reference) : bool
  • type: record
  • recordRef: : (the identifier of the link can differ from the table)
  • tokenValue: t3://record?identifier=&uid=
  • Parameters
    $url : string

    Url to check

    $softRefEntry : array<string|int, mixed>

    The soft reference entry which builds the context of that url

    $reference : LinkAnalyzer

    Parent instance

    Return values
    bool —

    TRUE on success or FALSE on error

    fetchType()

    Type fetching method, based on the type that softRefParserObj returns.

    public fetchType(array<string|int, mixed> $value, string $type, string $key) : string

    We support record link targets of the format t3://record?identifier=&uid=

    Parameters
    $value : array<string|int, mixed>

    Reference properties

    $type : string

    Current type

    $key : string

    Validator hook name

    Return values
    string —

    Fetched type

    getBrokenUrl()

    Construct a valid Url for browser output

    public getBrokenUrl(array<string|int, mixed> $row) : string
    Parameters
    $row : array<string|int, mixed>

    Broken link record

    Return values
    string —

    Parsed broken url

    getErrorMessage()

    Generates the localized error message from the error params saved from the parsing

    public getErrorMessage(array<string|int, mixed> $errorParams) : string
    Parameters
    $errorParams : array<string|int, mixed>

    All parameters needed for the rendering of the error message

    Return values
    string —

    Validation error message

    getErrorParams()

    Get the value of the private property errorParams

    public getErrorParams() : array<string|int, mixed>
    Return values
    array<string|int, mixed> —

    All parameters needed for the rendering of the error message

    getIdentifier()

    Returns the unique identifier of the linktype

    public getIdentifier() : string
    Return values
    string

    getReadableName()

    Get localized label for this linktype to be displayed in Backend user interface.

    public getReadableName() : string

    Custom Linktypes should override this and provide language labels for their type.

    Return values
    string

    setAdditionalConfig()

    Function to override config of Linktype. Should be used only if necessary. Add additional configuration to TSconfig.

    public setAdditionalConfig(array<string|int, mixed> $config) : void
    Parameters
    $config : array<string|int, mixed>

    setErrorParams()

    Set the value of the protected property errorParams

    protected setErrorParams(array<string|int, mixed> $value) : mixed
    Parameters
    $value : array<string|int, mixed>

    All parameters needed for the rendering of the error message

    On this page

    Search results