‪TYPO3CMS  ‪main
TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult Class Reference

Public Member Functions

 __construct (private readonly LinkAnalyzer $linkAnalyzer, private readonly BrokenLinkRepository $brokenLinkRepository, private readonly ConnectionPool $connectionPool, private readonly PagesRepository $pagesRepository)
 
 getResultForTask (int $page, int $depth, array $pageRow, array $modTSconfig, array $searchFields=[], array $linkTypes=[], string $languages='')
 
 setBrokenLinks (array $brokenLinks)
 
 getBrokenLinks ()
 
 setNewBrokenLinkCounts (array $newBrokenLinkCounts)
 
 getNewBrokenLinkCounts ()
 
 setOldBrokenLinkCounts (array $oldBrokenLinkCounts)
 
 getOldBrokenLinkCounts ()
 
 getTotalBrokenLinksCount ()
 
 isDifferentToLastResult ()
 

Protected Member Functions

 processLinkCounts (array $linkTypes)
 
 processBrokenLinks ()
 
 getLocalizedPageId (int $parentId, int $languageId)
 
 getLanguageService ()
 

Protected Attributes

array $brokenLinks = []
 
array $newBrokenLinkCounts = []
 
array $oldBrokenLinkCounts = []
 
bool $differentToLastResult = false
 
array $localizedPages = []
 

Detailed Description

Used to work with LinkAnalyzer results

Definition at line 37 of file LinkAnalyzerResult.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::__construct ( private readonly LinkAnalyzer  $linkAnalyzer,
private readonly BrokenLinkRepository  $brokenLinkRepository,
private readonly ConnectionPool  $connectionPool,
private readonly PagesRepository  $pagesRepository 
)

Definition at line 51 of file LinkAnalyzerResult.php.

Member Function Documentation

◆ getBrokenLinks()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::getBrokenLinks ( )

◆ getLanguageService()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::getLanguageService ( )
protected

◆ getLocalizedPageId()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::getLocalizedPageId ( int  $parentId,
int  $languageId 
)
protected

Get localized page id and store it in the local property localizedPages

Definition at line 225 of file LinkAnalyzerResult.php.

References $GLOBALS, TYPO3\CMS\Webhooks\Message\$identifier, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult\processBrokenLinks().

◆ getNewBrokenLinkCounts()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::getNewBrokenLinkCounts ( )

◆ getOldBrokenLinkCounts()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::getOldBrokenLinkCounts ( )

◆ getResultForTask()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::getResultForTask ( int  $page,
int  $depth,
array  $pageRow,
array  $modTSconfig,
array  $searchFields = [],
array  $linkTypes = [],
string  $languages = '' 
)

Call LinkAnalyzer with provided task configuration and process result values

Definition at line 61 of file LinkAnalyzerResult.php.

References $languages, and TYPO3\CMS\Core\Utility\GeneralUtility\intExplode().

◆ getTotalBrokenLinksCount()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::getTotalBrokenLinksCount ( )

Definition at line 152 of file LinkAnalyzerResult.php.

◆ isDifferentToLastResult()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::isDifferentToLastResult ( )

◆ processBrokenLinks()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::processBrokenLinks ( )
protected

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.

Definition at line 189 of file LinkAnalyzerResult.php.

References $GLOBALS, TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult\getLanguageService(), and TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult\getLocalizedPageId().

◆ processLinkCounts()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::processLinkCounts ( array  $linkTypes)
protected

Process the link counts (old and new) and ensures that all link types are available in the array

Parameters
array<int,string>‪$linkTypes list of link types

Definition at line 167 of file LinkAnalyzerResult.php.

◆ setBrokenLinks()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::setBrokenLinks ( array  $brokenLinks)

◆ setNewBrokenLinkCounts()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::setNewBrokenLinkCounts ( array  $newBrokenLinkCounts)

◆ setOldBrokenLinkCounts()

TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::setOldBrokenLinkCounts ( array  $oldBrokenLinkCounts)

Member Data Documentation

◆ $brokenLinks

array TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::$brokenLinks = []
protected

◆ $differentToLastResult

bool TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::$differentToLastResult = false
protected

◆ $localizedPages

array TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::$localizedPages = []
protected

Definition at line 49 of file LinkAnalyzerResult.php.

◆ $newBrokenLinkCounts

array TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::$newBrokenLinkCounts = []
protected

◆ $oldBrokenLinkCounts

array TYPO3\CMS\Linkvalidator\Result\LinkAnalyzerResult::$oldBrokenLinkCounts = []
protected