‪TYPO3CMS  9.5
TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype Class Reference
Inheritance diagram for TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype:
TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype TYPO3\CMS\Linkvalidator\Linktype\LinktypeInterface

Public Member Functions

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

Public Attributes

const DELETED = 'deleted'
 
const HIDDEN = 'hidden'
 
const MOVED = 'moved'
 
const NOTEXISTING = 'notExisting'
 

Protected Member Functions

bool checkPage ($page)
 
bool checkContent ($page, $anchor)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype
 setErrorParams ($value)
 
LanguageService getLanguageService ()
 

Protected Attributes

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

Detailed Description

This class provides Check Internal Links plugin implementation

Definition at line 24 of file InternalLinktype.php.

Member Function Documentation

◆ checkContent()

bool TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype::checkContent (   $page,
  $anchor 
)
protected

Checks a given content uid for validity

Parameters
string$page‪Uid of the page to which the link is pointing
string$anchor‪Uid of the content element to check
Returns
‪bool TRUE on success or FALSE on error

Definition at line 168 of file InternalLinktype.php.

References $GLOBALS, TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\$responseContent, TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\DELETED, TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\HIDDEN, TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\MOVED, and TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\NOTEXISTING.

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

◆ checkLink()

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

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

Parameters
string$url‪Url to check as page-id or page-id#anchor (if anchor is present)
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 66 of file InternalLinktype.php.

References TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\$responseContent, TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\checkContent(), TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\checkPage(), and TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\setErrorParams().

◆ checkPage()

bool TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype::checkPage (   $page)
protected

◆ getBrokenUrl()

string TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype::getBrokenUrl (   $row)

Constructs a valid Url for browser output

Parameters
array$row‪Broken link record
Returns
‪string Parsed broken url

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

Definition at line 335 of file InternalLinktype.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\BEgetRootLine(), and TYPO3\CMS\Backend\Utility\BackendUtility\firstDomainRecord().

◆ getErrorMessage()

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

Generates 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 227 of file InternalLinktype.php.

References TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\$errorParams, TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\DELETED, TYPO3\CMS\Linkvalidator\Linktype\AbstractLinktype\getLanguageService(), TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\HIDDEN, and TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\MOVED.

Member Data Documentation

◆ $responseContent

bool TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype::$responseContent = true
protected

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

Definition at line 56 of file InternalLinktype.php.

Referenced by TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\checkContent(), and TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\checkLink().

◆ $responsePage

bool TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype::$responsePage = true
protected

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

Definition at line 50 of file InternalLinktype.php.

Referenced by TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\checkPage().

◆ DELETED

◆ HIDDEN

◆ MOVED

const TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype::MOVED = 'moved'

◆ NOTEXISTING

const TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype::NOTEXISTING = 'notExisting'