LinkAnalyzerResult
class \
Used to work with LinkAnalyzer results
Internal
Table of Contents
Properties
- $brokenLinkRepository : BrokenLinkRepository
- $brokenLinks : array
- $connectionPool : ConnectionPool
- $differentToLastResult : bool
- $linkAnalyzer : LinkAnalyzer
- $localizedPages : array<string, int>
- Save localized pages to reduce database requests
- $newBrokenLinkCounts : array
- $oldBrokenLinkCounts : array
- $pagesRepository : PagesRepository
Methods
- __construct() : mixed
- getBrokenLinks() : array
- getNewBrokenLinkCounts() : array
- getOldBrokenLinkCounts() : array
- getResultForTask() : $this
- Call LinkAnalyzer with provided task configuration and process result values
- getTotalBrokenLinksCount() : int
- isDifferentToLastResult() : bool
- setBrokenLinks() : void
- setNewBrokenLinkCounts() : void
- setOldBrokenLinkCounts() : void
- getLanguageService() : LanguageService
- getLocalizedPageId() : int
- Get localized page id and store it in the local property localizedPages
- processBrokenLinks() : LinkAnalyzerResult
- Process broken link values and assign them to new variables which are used in the templates shipped by the core but can also be used in custom templates. The raw data is untouched and can also still be used in custom templates.
- processLinkCounts() : LinkAnalyzerResult
- Process the link counts (old and new) and ensures that all link types are available in the array
Properties
$brokenLinkRepository
protected
BrokenLinkRepository
$brokenLinkRepository
$brokenLinks
protected
array
$brokenLinks
= []
$connectionPool
protected
ConnectionPool
$connectionPool
$differentToLastResult
protected
bool
$differentToLastResult
= false
$linkAnalyzer
protected
LinkAnalyzer
$linkAnalyzer
$localizedPages
Save localized pages to reduce database requests
protected
array<string, int>
$localizedPages
= []
$newBrokenLinkCounts
protected
array
$newBrokenLinkCounts
= []
$oldBrokenLinkCounts
protected
array
$oldBrokenLinkCounts
= []
$pagesRepository
protected
PagesRepository
$pagesRepository
Methods
__construct()
public
__construct(LinkAnalyzer $linkAnalyzer, BrokenLinkRepository $brokenLinkRepository, ConnectionPool $connectionPool, PagesRepository $pagesRepository) : mixed
Parameters
- $linkAnalyzer : LinkAnalyzer
- $brokenLinkRepository : BrokenLinkRepository
- $connectionPool : ConnectionPool
- $pagesRepository : PagesRepository
getBrokenLinks()
public
getBrokenLinks() : array
Return values
arraygetNewBrokenLinkCounts()
public
getNewBrokenLinkCounts() : array
Return values
arraygetOldBrokenLinkCounts()
public
getOldBrokenLinkCounts() : array
Return values
arraygetResultForTask()
Call LinkAnalyzer with provided task configuration and process result values
public
getResultForTask(int $page, int $depth, array $pageRow, array $modTSconfig[, array $searchFields = [] ][, array $linkTypes = [] ][, string $languages = '' ]) : $this
Parameters
- $page : int
- $depth : int
- $pageRow : array
- $modTSconfig : array
- $searchFields : array = []
- $linkTypes : array = []
- $languages : string = ''
Return values
$thisgetTotalBrokenLinksCount()
public
getTotalBrokenLinksCount() : int
Return values
intisDifferentToLastResult()
public
isDifferentToLastResult() : bool
Return values
boolsetBrokenLinks()
public
setBrokenLinks(array $brokenLinks) : void
Parameters
- $brokenLinks : array
setNewBrokenLinkCounts()
public
setNewBrokenLinkCounts(array $newBrokenLinkCounts) : void
Parameters
- $newBrokenLinkCounts : array
setOldBrokenLinkCounts()
public
setOldBrokenLinkCounts(array $oldBrokenLinkCounts) : void
Parameters
- $oldBrokenLinkCounts : array
getLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetLocalizedPageId()
Get localized page id and store it in the local property localizedPages
protected
getLocalizedPageId(int $parentId, int $languageId) : int
Parameters
- $parentId : int
- $languageId : int
Return values
intprocessBrokenLinks()
Process broken link values and assign them to new variables which are used in the templates shipped by the core but can also be used in custom templates. The raw data is untouched and can also still be used in custom templates.
protected
processBrokenLinks() : LinkAnalyzerResult
Return values
LinkAnalyzerResultprocessLinkCounts()
Process the link counts (old and new) and ensures that all link types are available in the array
protected
processLinkCounts(array<int, string> $linkTypes) : LinkAnalyzerResult
Parameters
- $linkTypes : array<int, string>
-
list of link types