InternalLinktype

class \TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype

Extends
AbstractLinktype

This class provides Check Internal Links plugin implementation

Table of Contents

Constants

DELETED  : string = 'deleted'
HIDDEN  : string = 'hidden'
MOVED  : string = 'moved'
NOTEXISTING  : string = 'notExisting'

Properties

$errorParams  : array
Contains parameters needed for the rendering of the error message
$responseContent  : bool
Result of the check, if the current content uid is valid or not
$responsePage  : bool
Result of the check, if the current page uid is valid or not

Methods

checkLink()  : bool
Checks a given URL + /path/filename.ext for validity
fetchType()  : string
Base type fetching method, based on the type that softRefParserObj returns
getBrokenUrl()  : string
Constructs a valid Url for browser output
getErrorMessage()  : string
Generates the localized error message from the error params saved from the parsing
getErrorParams()  : array
Get the value of the private property errorParams
setAdditionalConfig()  : void
Function to override config of Linktype. Should be used only if necessary. Add additional configuration to TSconfig.
checkContent()  : bool
Checks a given content uid for validity
checkPage()  : bool
Checks a given page uid for validity
getLanguageService()  : LanguageService
setErrorParams()  : mixed
Set the value of the protected property errorParams

Constants

NOTEXISTING

public string NOTEXISTING = 'notExisting'

Properties

$errorParams

Contains parameters needed for the rendering of the error message

protected array $errorParams = []

$responseContent

Result of the check, if the current content uid is valid or not

protected bool $responseContent = true

$responsePage

Result of the check, if the current page uid is valid or not

protected bool $responsePage = true

Methods

Checks a given URL + /path/filename.ext for validity

public checkLink(string $url, array $softRefEntry, LinkAnalyzer $reference) : bool

Parameters

$url : string

Url to check as page-id or page-id#anchor (if anchor is present)

$softRefEntry : array

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()

Base type fetching method, based on the type that softRefParserObj returns

public fetchType(array $value, string $type, string $key) : string

Parameters

$value : array

Reference properties

$type : string

Current type

$key : string

Validator hook name

Return values

string —

Fetched type

getBrokenUrl()

Constructs a valid Url for browser output

public getBrokenUrl(array $row) : string

Parameters

$row : array

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 $errorParams) : string

Parameters

$errorParams : array

All parameters needed for the rendering of the error message

Tags

todo

change input parameter type to array in TYPO3 v13

Return values

string —

Validation error message

getErrorParams()

Get the value of the private property errorParams

public getErrorParams() : array

Tags

todo

change return type to array in TYPO3 v13

Return values

array —

All parameters needed for the rendering of the error message

setAdditionalConfig()

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

public setAdditionalConfig(array $config) : void

Parameters

$config : array

checkContent()

Checks a given content uid for validity

protected checkContent(int $page, int $anchor) : bool

Parameters

$page : int

Uid of the page to which the link is pointing

$anchor : int

Uid of the content element to check

Return values

bool —

TRUE on success or FALSE on error

checkPage()

Checks a given page uid for validity

protected checkPage(int $page) : bool

Parameters

$page : int

Page uid to check

Return values

bool —

TRUE on success or FALSE on error

setErrorParams()

Set the value of the protected property errorParams

protected setErrorParams(array $value) : mixed

Parameters

$value : array

All parameters needed for the rendering of the error message

On this page