TYPO3 CMS  TYPO3_6-2
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 tx_linkvalidator_linktype_Internal

Public Member Functions

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

Public Attributes

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

Protected Member Functions

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

Protected Attributes

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

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! This class provides Check Internal Links plugin implementation

Author
Dimitri König dk@ca.nosp@m.bag..nosp@m.ch
Michael Miousse micha.nosp@m.el.m.nosp@m.iouss.nosp@m.e@in.nosp@m.foglo.nosp@m.be.c.nosp@m.a

Definition at line 23 of file InternalLinktype.php.

Member Function Documentation

◆ checkContent()

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

Checks a given content uid for validity

Parameters
string$pageUid of the page to which the link is pointing
string$anchorUid of the content element to check
Returns
boolean TRUE on success or FALSE on error

Definition at line 148 of file InternalLinktype.php.

References $GLOBALS, and TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\$responseContent.

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

◆ checkLink()

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

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

Parameters
string$urlUrl 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$referenceParent instance
Returns
boolean TRUE on success or FALSE on error

Implements TYPO3\CMS\Linkvalidator\Linktype\LinktypeInterface.

Definition at line 74 of file InternalLinktype.php.

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

◆ checkPage()

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

Checks a given page uid for validity

Parameters
string$pagePage uid to check
Returns
boolean TRUE on success or FALSE on error

Definition at line 118 of file InternalLinktype.php.

References $GLOBALS, and TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\$responsePage.

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

◆ getBrokenUrl()

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

Constructs a valid Url for browser output

Parameters
array$rowBroken link record
Returns
string Parsed broken url

Implements TYPO3\CMS\Linkvalidator\Linktype\LinktypeInterface.

Definition at line 299 of file InternalLinktype.php.

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

◆ getErrorMessage()

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

Generates 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 TYPO3\CMS\Linkvalidator\Linktype\LinktypeInterface.

Definition at line 193 of file InternalLinktype.php.

References TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype\$errorParams, and $GLOBALS.

Member Data Documentation

◆ $errorParams

TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype::$errorParams = array()
protected

◆ $responseContent

TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype::$responseContent = TRUE
protected

◆ $responsePage

TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype::$responsePage = TRUE
protected

◆ DELETED

const TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype::DELETED = 'deleted'

Definition at line 28 of file InternalLinktype.php.

◆ HIDDEN

const TYPO3\CMS\Linkvalidator\Linktype\InternalLinktype::HIDDEN = 'hidden'

Definition at line 33 of file InternalLinktype.php.

◆ MOVED

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

Definition at line 38 of file InternalLinktype.php.

◆ NOTEXISTING

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

Definition at line 43 of file InternalLinktype.php.