‪TYPO3CMS  10.4
TYPO3\CMS\Linkvalidator\Linktype\LinkHandler Class Reference
Inheritance diagram for TYPO3\CMS\Linkvalidator\Linktype\LinkHandler:
TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype TYPO3\CMS\Linkvalidator\Linktype\LinktypeInterface

Public Member Functions

bool checkLink ($url, $softRefEntry, $reference)
 
string fetchType ($value, $type, $key)
 
string getErrorMessage ($errorParams)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype
 setAdditionalConfig (array $config)
 
array getErrorParams ()
 
string getBrokenUrl ($row)
 

Public Attributes

const DELETED = 'deleted'
 
const DISABLED = 'disabled'
 

Protected Member Functions

string getTranslatedErrorMessage ($translationKey, $uid, $title=null)
 
array bool getRecordRow ($tableName, $uid, $filter='')
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype
 setErrorParams ($value)
 
LanguageService getLanguageService ()
 

Additional Inherited Members

- ‪Protected Attributes inherited from ‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype
array $errorParams = array( )
 

Detailed Description

This class provides Check Link Handler plugin implementation

Definition at line 25 of file LinkHandler.php.

Member Function Documentation

◆ checkLink()

bool TYPO3\CMS\Linkvalidator\Linktype\LinkHandler::checkLink (   $url,
  $softRefEntry,
  $reference 
)

Checks a given URL for validity

Parameters
string$url‪Url to check
array$softRefEntry‪The soft reference entry which builds the context of that url
\TYPO3\CMS\Linkvalidator\LinkAnalyzer$reference‪Parent instance
Returns
‪bool TRUE on success or FALSE on error

Implements TYPO3\CMS\Linkvalidator\Linktype\LinktypeInterface.

Definition at line 45 of file LinkHandler.php.

References TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\$errorParams, TYPO3\CMS\Linkvalidator\Linktype\LinkHandler\DELETED, TYPO3\CMS\Linkvalidator\Linktype\LinkHandler\DISABLED, TYPO3\CMS\Linkvalidator\Linktype\LinkHandler\getRecordRow(), and TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\setErrorParams().

◆ fetchType()

string TYPO3\CMS\Linkvalidator\Linktype\LinkHandler::fetchType (   $value,
  $type,
  $key 
)

Type fetching method, based on the type that softRefParserObj returns

Parameters
array$value‪Reference properties
string$type‪Current type
string$key‪Validator hook name
Returns
‪string fetched type

Reimplemented from TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype.

Definition at line 110 of file LinkHandler.php.

◆ getErrorMessage()

string TYPO3\CMS\Linkvalidator\Linktype\LinkHandler::getErrorMessage (   $errorParams)

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

Parameters
array$errorParams‪All parameters needed for the rendering of the error message
Returns
‪string Validation error message

Implements TYPO3\CMS\Linkvalidator\Linktype\LinktypeInterface.

Definition at line 124 of file LinkHandler.php.

References TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\$errorParams, $GLOBALS, TYPO3\CMS\Linkvalidator\Linktype\LinkHandler\DELETED, TYPO3\CMS\Linkvalidator\Linktype\LinkHandler\DISABLED, TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\getLanguageService(), TYPO3\CMS\Linkvalidator\Linktype\LinkHandler\getTranslatedErrorMessage(), and TYPO3\CMS\Core\Localization\LanguageService\sL().

◆ getRecordRow()

array bool TYPO3\CMS\Linkvalidator\Linktype\LinkHandler::getRecordRow (   $tableName,
  $uid,
  $filter = '' 
)
protected

Fetches the record with the given UID from the given table.

The filter option accepts two values:

"disabled" will filter out disabled and deleted records. "deleted" filters out deleted records but will return disabled records. If nothing is specified all records will be returned (including deleted).

Parameters
string$tableName‪The name of the table from which the record should be fetched.
int$uid‪The UID of the record that should be fetched.
string$filter‪A filter setting, can be empty or "disabled" or "deleted".
Returns
‪array|bool The result row as associative array or false if nothing is found.

Definition at line 178 of file LinkHandler.php.

References TYPO3\CMS\Linkvalidator\Linktype\LinkHandler\DELETED, and TYPO3\CMS\Linkvalidator\Linktype\LinkHandler\DISABLED.

Referenced by TYPO3\CMS\Linkvalidator\Linktype\LinkHandler\checkLink().

◆ getTranslatedErrorMessage()

string TYPO3\CMS\Linkvalidator\Linktype\LinkHandler::getTranslatedErrorMessage (   $translationKey,
  $uid,
  $title = null 
)
protected

Fetches the translation with the given key and replaces the ###uid### and ###title### markers

Parameters
string$translationKey
int$uid
string$title
Returns
‪string

Definition at line 154 of file LinkHandler.php.

References TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\getLanguageService(), and TYPO3\CMS\Core\Localization\LanguageService\getLL().

Referenced by TYPO3\CMS\Linkvalidator\Linktype\LinkHandler\getErrorMessage().

Member Data Documentation

◆ DELETED

◆ DISABLED