LinkAnalyzer

This class provides Processing plugin implementation

Internal

Table of Contents

Properties

$brokenLinkCounts  : array<string|int, mixed>
Array of tables and the number of broken external links they contain
$brokenLinkRepository  : BrokenLinkRepository
$eventDispatcher  : EventDispatcherInterface
$linkCounts  : array<string|int, mixed>
Array of tables and the number of external links they contain
$linktypeRegistry  : LinktypeRegistry
$pids  : array<string|int, int>
List of page uids (rootline downwards)
$searchFields  : array<string, array<int, string>>
Array of tables and fields to search for broken links
$softReferenceParserFactory  : SoftReferenceParserFactory
$tsConfig  : array<string|int, mixed>
The currently active TSconfig. Will be passed to the init function.

Methods

__construct()  : mixed
analyzeRecord()  : mixed
Find all supported broken links for a specific record
getLinkCounts()  : array<string|int, mixed>
Fill a marker array with the number of links found in a list of pages
getLinkStatistics()  : mixed
Find all supported broken links and store them in tx_linkvalidator_link
init()  : mixed
Store all the needed configuration values in class variables
recheckLinks()  : void
Recheck for broken links for one field in table for record.
analyzeLinks()  : mixed
Find all supported broken links for a specific link list
analyzeTypoLinks()  : mixed
Find all supported broken links for a specific typoLink
checkLinks()  : mixed
getLanguageService()  : LanguageService

Properties

$brokenLinkCounts

Array of tables and the number of broken external links they contain

protected array<string|int, mixed> $brokenLinkCounts = []

$eventDispatcher read-only

protected EventDispatcherInterface $eventDispatcher

$linkCounts

Array of tables and the number of external links they contain

protected array<string|int, mixed> $linkCounts = []

$pids

List of page uids (rootline downwards)

protected array<string|int, int> $pids = []

$searchFields

Array of tables and fields to search for broken links

protected array<string, array<int, string>> $searchFields = []

$tsConfig

The currently active TSconfig. Will be passed to the init function.

protected array<string|int, mixed> $tsConfig = []

Methods

analyzeRecord()

Find all supported broken links for a specific record

public analyzeRecord(array<string|int, mixed> &$results, string $table, array<string|int, mixed> $fields, array<string|int, mixed> $record) : mixed
Parameters
$results : array<string|int, mixed>

Array of broken links

$table : string

Table name of the record

$fields : array<string|int, mixed>

Array of fields to analyze

$record : array<string|int, mixed>

Record to analyze

getLinkCounts()

Fill a marker array with the number of links found in a list of pages

public getLinkCounts() : array<string|int, mixed>
Return values
array<string|int, mixed>

array with the number of links found

getLinkStatistics()

Find all supported broken links and store them in tx_linkvalidator_link

public getLinkStatistics([array<int, string> $linkTypes = [] ][, bool $considerHidden = false ]) : mixed
Parameters
$linkTypes : array<int, string> = []

List of hook object to activate

$considerHidden : bool = false

Defines whether to look into hidden fields

init()

Store all the needed configuration values in class variables

public init(array<string|int, mixed> $searchFields, array<string|int, int> $pidList, array<string|int, mixed> $tsConfig) : mixed
Parameters
$searchFields : array<string|int, mixed>

List of fields in which to search for links

$pidList : array<string|int, int>

List of page uids in which to search for links

$tsConfig : array<string|int, mixed>

The currently active TSconfig.

Recheck for broken links for one field in table for record.

public recheckLinks(array<string|int, mixed> $checkOptions, string $recordUid, string $table, string $field, int $timestamp[, bool $considerHidden = true ]) : void
Parameters
$checkOptions : array<string|int, mixed>
$recordUid : string

uid of record to check

$table : string
$field : string
$timestamp : int
  • only recheck if timestamp changed
$considerHidden : bool = true

Find all supported broken links for a specific link list

protected analyzeLinks(SoftReferenceParserResult $parserResult, array<string|int, mixed> &$results, array<string|int, mixed> $record, string $field, string $table) : mixed
Parameters
$parserResult : SoftReferenceParserResult

findRef parsed records

$results : array<string|int, mixed>

Array of broken links

$record : array<string|int, mixed>

UID of the current record

$field : string

The current field

$table : string

The current table

Find all supported broken links for a specific typoLink

protected analyzeTypoLinks(SoftReferenceParserResult $parserResult, array<string|int, mixed> &$results, HtmlParser $htmlParser, array<string|int, mixed> $record, string $field, string $table) : mixed
Parameters
$parserResult : SoftReferenceParserResult

findRef parsed records

$results : array<string|int, mixed>

Array of broken links

$htmlParser : HtmlParser

Instance of html parser

$record : array<string|int, mixed>

The current record

$field : string

The current field

$table : string

The current table

protected checkLinks(array<string|int, mixed> $links, array<int, string> $linkTypes) : mixed
Parameters
$links : array<string|int, mixed>
$linkTypes : array<int, string>

        
On this page

Search results