TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
LinkHandler Class Reference
Inheritance diagram for LinkHandler:
AbstractLinktype LinktypeInterface

Public Member Functions

 checkLink ($url, $softRefEntry, $reference)
 
 fetchType ($value, $type, $key)
 
 getErrorMessage ($errorParams)
 
- Public Member Functions inherited from AbstractLinktype
 fetchType ($value, $type, $key)
 
 getErrorParams ()
 
 getBrokenUrl ($row)
 

Public Attributes

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

Protected Member Functions

 getTranslatedErrorMessage ($translationKey, $uid, $title=null)
 
 getRecordRow ($tableName, $uid, $filter= '')
 
- Protected Member Functions inherited from AbstractLinktype
 setErrorParams ($value)
 
 getLanguageService ()
 
 getDatabaseConnection ()
 

Additional Inherited Members

- Protected Attributes inherited from AbstractLinktype
 $errorParams = array()
 

Detailed Description

This class provides Check Link Handler plugin implementation

Definition at line 23 of file LinkHandler.php.

Member Function Documentation

checkLink (   $url,
  $softRefEntry,
  $reference 
)

Checks a given URL for validity

Parameters
string$urlUrl to check
array$softRefEntryThe soft reference entry which builds the context of that url
\TYPO3\CMS\Linkvalidator\LinkAnalyzer$referenceParent instance
Returns
bool TRUE on success or FALSE on error

Implements LinktypeInterface.

Definition at line 43 of file LinkHandler.php.

References AbstractLinktype\$errorParams, $response, $url, LinkHandler\getRecordRow(), and AbstractLinktype\setErrorParams().

fetchType (   $value,
  $type,
  $key 
)

Type fetching method, based on the type that softRefParserObj returns

Parameters
array$valueReference properties
string$typeCurrent type
string$keyValidator hook name
Returns
string fetched type

Implements LinktypeInterface.

Definition at line 108 of file LinkHandler.php.

References StringUtility\beginsWith().

getErrorMessage (   $errorParams)

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

Parameters
array$errorParamsAll parameters needed for the rendering of the error message
Returns
string Validation error message

Implements LinktypeInterface.

Definition at line 122 of file LinkHandler.php.

References AbstractLinktype\$errorParams, $GLOBALS, $response, AbstractLinktype\getLanguageService(), and LinkHandler\getTranslatedErrorMessage().

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$tableNameThe name of the table from which the record should be fetched.
int$uidThe UID of the record that should be fetched.
string$filterA filter setting, can be empty or "disabled" or "deleted".
Returns
array|NULL The result row as associative array or NULL if nothing is found.

Definition at line 176 of file LinkHandler.php.

References BackendUtility\BEenableFields(), BackendUtility\deleteClause(), and AbstractLinktype\getDatabaseConnection().

Referenced by LinkHandler\checkLink().

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 152 of file LinkHandler.php.

References AbstractLinktype\getLanguageService().

Referenced by LinkHandler\getErrorMessage().

Member Data Documentation

const DELETED = 'deleted'

Definition at line 28 of file LinkHandler.php.

const DISABLED = 'disabled'

Definition at line 33 of file LinkHandler.php.