TYPO3  7.6
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
LinkAnalyzer Class Reference

Public Member Functions

 __construct ()
 
 init (array $searchField, $pid, $tsConfig)
 
 getLinkStatistics ($checkOptions=array(), $considerHidden=false)
 
 getTSConfig ()
 
 getLinkCounts ($curPage)
 
 extGetTreeList ($id, $depth, $begin=0, $permsClause, $considerHidden=false)
 
 getRootLineIsHidden (array $pageInfo)
 

Protected Member Functions

 emitBeforeAnalyzeRecordSignal ($results, $record, $table, $fields)
 
 getSignalSlotDispatcher ()
 
 getObjectManager ()
 
 getDatabaseConnection ()
 
 getLanguageService ()
 

Protected Attributes

 $searchFields = array()
 
 $pidList = ''
 
 $linkCounts = array()
 
 $brokenLinkCounts = array()
 
 $recordsWithBrokenLinks = array()
 
 $hookObjectsArr = array()
 
 $extPageInTreeInfo = array()
 
 $recordReference = ''
 
 $pageWithAnchor = ''
 
 $tsConfig = array()
 

Detailed Description

This class provides Processing plugin implementation

Definition at line 25 of file LinkAnalyzer.php.

Constructor & Destructor Documentation

__construct ( )

Fill hookObjectsArr with different link types and possible XClasses.

Definition at line 100 of file LinkAnalyzer.php.

References $GLOBALS, LinkAnalyzer\getLanguageService(), and GeneralUtility\getUserObj().

Member Function Documentation

emitBeforeAnalyzeRecordSignal (   $results,
  $record,
  $table,
  $fields 
)
protected

Emits a signal before the record is analyzed

Parameters
array$resultsArray of broken links
array$recordRecord to analyse
string$tableTable name of the record
array$fieldsArray of fields to analyze
Returns
array

Definition at line 487 of file LinkAnalyzer.php.

References LinkAnalyzer\getSignalSlotDispatcher().

extGetTreeList (   $id,
  $depth,
  $begin = 0,
  $permsClause,
  $considerHidden = false 
)

Calls TYPO3::extGetTreeList. Although this duplicates the function TYPO3::extGetTreeList this is necessary to create the object that is used recursively by the original function.

Generates a list of page uids from $id. List does not include $id itself. The only pages excluded from the list are deleted pages.

Parameters
int$idStart page id
int$depthDepth to traverse down the page tree.
int$beginis an optional integer that determines at which
string$permsClausePerms clause
bool$considerHiddenWhether to consider hidden pages or not
Returns
string Returns the list with a comma in the end (if any pages selected!)

Definition at line 423 of file LinkAnalyzer.php.

References LinkAnalyzer\getDatabaseConnection().

getDatabaseConnection ( )
protected
getLanguageService ( )
protected
Returns
LanguageService

Definition at line 523 of file LinkAnalyzer.php.

References $GLOBALS.

Referenced by LinkAnalyzer\__construct().

getLinkCounts (   $curPage)

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

Parameters
string$curPageComma separated list of page uids
Returns
array Marker array with the number of links found

Definition at line 385 of file LinkAnalyzer.php.

References LinkAnalyzer\getDatabaseConnection().

getLinkStatistics (   $checkOptions = array(),
  $considerHidden = false 
)

Find all supported broken links and store them in tx_linkvalidator_link

Parameters
array$checkOptionsList of hook object to activate
bool$considerHiddenDefines whether to look into hidden fields
Returns
void

Definition at line 133 of file LinkAnalyzer.php.

References $GLOBALS, LinkAnalyzer\$pageWithAnchor, $response, $url, GeneralUtility\_GP(), BackendUtility\BEenableFields(), elseif, LinkAnalyzer\getDatabaseConnection(), and BackendUtility\getRecordTitle().

getObjectManager ( )
protected
Returns

Definition at line 507 of file LinkAnalyzer.php.

References GeneralUtility\makeInstance().

Referenced by LinkAnalyzer\getSignalSlotDispatcher().

getRootLineIsHidden ( array  $pageInfo)

Check if rootline contains a hidden page

Parameters
array$pageInfoArray with uid, title, hidden, extendToSubpages from pages table
Returns
bool TRUE if rootline contains a hidden page, FALSE if not

Definition at line 456 of file LinkAnalyzer.php.

References LinkAnalyzer\getDatabaseConnection().

getSignalSlotDispatcher ( )
protected
Returns

Definition at line 499 of file LinkAnalyzer.php.

References LinkAnalyzer\getObjectManager().

Referenced by LinkAnalyzer\emitBeforeAnalyzeRecordSignal().

getTSConfig ( )

Returns the TSConfig that was passed to the init() method.

This can be used by link checkers that get a reference of this object passed to the checkLink() method.

Returns
array

Definition at line 278 of file LinkAnalyzer.php.

References LinkAnalyzer\$tsConfig.

init ( array  $searchField,
  $pid,
  $tsConfig 
)

Store all the needed configuration values in class variables

Parameters
array$searchFieldList of fields in which to search for links
string$pidList of comma separated page uids in which to search for links
array$tsConfigThe currently active TSConfig.
Returns
void

Definition at line 119 of file LinkAnalyzer.php.

References LinkAnalyzer\$tsConfig.

Member Data Documentation

$brokenLinkCounts = array()
protected

Definition at line 53 of file LinkAnalyzer.php.

$extPageInTreeInfo = array()
protected

Definition at line 74 of file LinkAnalyzer.php.

$hookObjectsArr = array()
protected

Definition at line 67 of file LinkAnalyzer.php.

$linkCounts = array()
protected

Definition at line 46 of file LinkAnalyzer.php.

$pageWithAnchor = ''
protected

Definition at line 88 of file LinkAnalyzer.php.

Referenced by LinkAnalyzer\getLinkStatistics().

$pidList = ''
protected

Definition at line 39 of file LinkAnalyzer.php.

$recordReference = ''
protected

Definition at line 81 of file LinkAnalyzer.php.

$recordsWithBrokenLinks = array()
protected

Definition at line 60 of file LinkAnalyzer.php.

$searchFields = array()
protected

Definition at line 32 of file LinkAnalyzer.php.

$tsConfig = array()
protected

Definition at line 95 of file LinkAnalyzer.php.

Referenced by LinkAnalyzer\getTSConfig(), and LinkAnalyzer\init().