LinkValidatorController

class \TYPO3\CMS\Linkvalidator\Controller\LinkValidatorController

Controller for the LinkValidator report module

Attributes

#[AsController]

Table of Contents

Properties

$brokenLinkRepository  : BrokenLinkRepository
$checkOpt  : array
List of link types currently chosen in the statistics table Used to show broken links of these types only For "Report" and "Check link" form
$context  : Context
$iconFactory  : IconFactory
$id  : int
$lastEditedRecord  : array
Information for last edited record
$linkAnalyzer  : LinkAnalyzer
$linktypeRegistry  : LinktypeRegistry
$modTS  : array
TSconfig of the current module
$moduleTemplateFactory  : ModuleTemplateFactory
$pageRecord  : array
Information about the current page record
$pagesRepository  : PagesRepository
$searchFields  : array
$searchLevel  : array
Depth for the recursive traversal of pages for the link validation For "Report" and "Check link" form
$tcaSchemaFactory  : TcaSchemaFactory
$translationConfigurationProvider  : TranslationConfigurationProvider
$uriBuilder  : UriBuilder

Methods

__construct()  : mixed
__invoke()  : ResponseInterface
addDocHeaderShortCutButton()  : void
generateTableRow()  : array
Generates information for a single row of the broken links table
getBackendUser()  : BackendUserAuthentication
getBrokenLinks()  : array
Returns the broken links or adds a note if there were no broken links
getCheckOptions()  : array
Builds the checkboxes to show which types of links are available
getLanguageService()  : LanguageService
getLinkTypesFromCheckOptions()  : string[]
getModuleTitle()  : string
getModuleUri()  : string
getPageList()  : int[]
Generates an array of page uids from current pageUid.
getSystemLanguageValue()  : string
Gets a named value of an available system language
initializeLinkAnalyzer()  : void
Updates the table of stored broken links
updateBrokenLinks()  : void
Check for broken links
validateSettings()  : void
Checks for incoming GET/POST parameters to update the module settings

Properties

$checkOpt

List of link types currently chosen in the statistics table Used to show broken links of these types only For "Report" and "Check link" form

protected array $checkOpt = ['report' => [], 'check' => []]

$lastEditedRecord

Information for last edited record

protected array $lastEditedRecord = ['uid' => 0, 'table' => '', 'field' => '', 'timestamp' => 0]

$modTS

TSconfig of the current module

protected array $modTS = []

$pageRecord

Information about the current page record

protected array $pageRecord = []

$searchFields

protected array $searchFields = []

$searchLevel

Depth for the recursive traversal of pages for the link validation For "Report" and "Check link" form

protected array $searchLevel = ['report' => 0, 'check' => 0]

Methods

__construct()

public __construct(Context $context, UriBuilder $uriBuilder, IconFactory $iconFactory, PagesRepository $pagesRepository, BrokenLinkRepository $brokenLinkRepository, ModuleTemplateFactory $moduleTemplateFactory, LinkAnalyzer $linkAnalyzer, LinktypeRegistry $linktypeRegistry, TranslationConfigurationProvider $translationConfigurationProvider, TcaSchemaFactory $tcaSchemaFactory) : mixed

Parameters

$context : Context
$uriBuilder : UriBuilder
$iconFactory : IconFactory
$pagesRepository : PagesRepository
$brokenLinkRepository : BrokenLinkRepository
$moduleTemplateFactory : ModuleTemplateFactory
$linkAnalyzer : LinkAnalyzer
$linktypeRegistry : LinktypeRegistry
$translationConfigurationProvider : TranslationConfigurationProvider
$tcaSchemaFactory : TcaSchemaFactory

__invoke()

public __invoke(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Return values

ResponseInterface

generateTableRow()

Generates information for a single row of the broken links table

protected generateTableRow(array $row) : array

Parameters

$row : array

Return values

array

Returns the broken links or adds a note if there were no broken links

protected getBrokenLinks() : array

Return values

array

getCheckOptions()

Builds the checkboxes to show which types of links are available

protected getCheckOptions(string $prefix) : array

Parameters

$prefix : string

"report" or "check" for "Report" and "Check links" form

Return values

array

getLinkTypesFromCheckOptions()

protected getLinkTypesFromCheckOptions() : string[]

Return values

string[]

getModuleTitle()

protected getModuleTitle() : string

Return values

string

getModuleUri()

protected getModuleUri([string|null $action = null ][, array $additionalPramaters = [] ]) : string

Parameters

$action : string|null = null
$additionalPramaters : array = []

Return values

string

getPageList()

Generates an array of page uids from current pageUid.

protected getPageList() : int[]

List does include pageUid itself.

Return values

int[]

getSystemLanguageValue()

Gets a named value of an available system language

protected getSystemLanguageValue(int $id, int $pageId, string $key) : string

Parameters

$id : int

system language uid

$pageId : int

page id of a site

$key : string

Name of the value to be fetched (e.g. title)

Return values

string

initializeLinkAnalyzer()

Updates the table of stored broken links

protected initializeLinkAnalyzer() : void

Check for broken links

protected updateBrokenLinks() : void

validateSettings()

Checks for incoming GET/POST parameters to update the module settings

protected validateSettings(ServerRequestInterface $request) : void

Parameters

$request : ServerRequestInterface
On this page