‪TYPO3CMS  10.4
TYPO3\CMS\Linkvalidator\Task\ValidatorTask Class Reference
Inheritance diagram for TYPO3\CMS\Linkvalidator\Task\ValidatorTask:
TYPO3\CMS\Scheduler\Task\AbstractTask

Public Member Functions

string getEmail ()
 
 setEmail ($email)
 
bool getEmailOnBrokenLinkOnly ()
 
 setEmailOnBrokenLinkOnly ($emailOnBrokenLinkOnly)
 
int getPage ()
 
 setPage ($page)
 
int getDepth ()
 
 setDepth ($depth)
 
string getEmailTemplateFile ()
 
 setEmailTemplateFile ($emailTemplateFile)
 
array getConfiguration ()
 
 setConfiguration ($configuration)
 
bool execute ()
 
string getAdditionalInformation ()
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
 __construct ()
 
 setTaskUid ($id)
 
int getTaskUid ()
 
string getTaskTitle ()
 
string getTaskDescription ()
 
string getTaskClassName ()
 
bool isDisabled ()
 
 setDisabled ($flag)
 
 setRunOnNextCronJob ($flag)
 
bool getRunOnNextCronJob ()
 
 setExecutionTime ($timestamp)
 
int getTaskGroup ()
 
 setTaskGroup ($taskGroup)
 
int getExecutionTime ()
 
 setDescription ($description)
 
string getDescription ()
 
 setScheduler ()
 
 unsetScheduler ()
 
 registerSingleExecution ($timestamp)
 
 registerRecurringExecution ($start, $interval, $end=0, $multiple=false, $cron_cmd='')
 
 setExecution (Execution $execution)
 
Execution getExecution ()
 
int getNextDueExecution ()
 
bool areMultipleExecutionsAllowed ()
 
bool isExecutionRunning ()
 
int markExecution ()
 
 unmarkExecution ($executionID, \Throwable $failure=null)
 
bool unmarkAllExecutions ()
 
bool save ()
 
 stop ()
 
 remove ()
 
int getType ()
 

Protected Member Functions

string checkPageLinks ($page)
 
array loadModTsConfig ($page)
 
array getSearchField (array $modTS)
 
array getLinkTypes (array $modTS)
 
bool reportEmail ($pageSections, array $modTsConfig)
 
string buildMail ($curPage, $pageList, array $markerArray, array $oldBrokenLink)
 
 setCliArguments ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
 logException (\Exception $e)
 
LanguageService null getLanguageService ()
 

Protected Attributes

int $sleepTime
 
int $sleepAfterFinish
 
int $countInARun
 
int $totalBrokenLink = 0
 
int $oldTotalBrokenLink = 0
 
string $templateMail
 
array $configuration = array( )
 
bool $isDifferentToLastRun
 
string $emailTemplateFile
 
int $depth
 
int $page
 
string $email
 
bool $emailOnBrokenLinkOnly
 
MarkerBasedTemplateService $templateService
 
string $languageFile = 'LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf'
 
BrokenLinkRepository $brokenLinkRepository
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
TYPO3 CMS Scheduler Scheduler $scheduler
 
int $taskUid
 
bool $disabled = false
 
bool $runOnNextCronJob = false
 
Execution $execution
 
int $executionTime = 0
 
string $description = ''
 
int $taskGroup = 0
 

Additional Inherited Members

- ‪Public Attributes inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
const TYPE_SINGLE = 1
 
const TYPE_RECURRING = 2
 

Detailed Description

This class provides Scheduler plugin implementation

This class is a specific Scheduler task implementation and is not part of the TYPO3's Core API.

Definition at line 34 of file ValidatorTask.php.

Member Function Documentation

◆ buildMail()

string TYPO3\CMS\Linkvalidator\Task\ValidatorTask::buildMail (   $curPage,
  $pageList,
array  $markerArray,
array  $oldBrokenLink 
)
protected

Build the mail content

Parameters
int$curPage‪Id of the current page
string$pageList‪List of pages id
array$markerArray‪Array of markers
array$oldBrokenLink‪Marker array with the number of link found
Returns
‪string Content of the mail

Definition at line 509 of file ValidatorTask.php.

References $GLOBALS, TYPO3\CMS\Backend\Utility\BackendUtility\getRecord(), and TYPO3\CMS\Backend\Utility\BackendUtility\getRecordTitle().

Referenced by TYPO3\CMS\Linkvalidator\Task\ValidatorTask\checkPageLinks().

◆ checkPageLinks()

string TYPO3\CMS\Linkvalidator\Task\ValidatorTask::checkPageLinks (   $page)
protected

◆ execute()

◆ getAdditionalInformation()

string TYPO3\CMS\Linkvalidator\Task\ValidatorTask::getAdditionalInformation ( )

◆ getConfiguration()

array TYPO3\CMS\Linkvalidator\Task\ValidatorTask::getConfiguration ( )

Get the value of the protected property configuration

Returns
‪array specific TSconfig for this task

Definition at line 225 of file ValidatorTask.php.

References TYPO3\CMS\Linkvalidator\Task\ValidatorTask\$configuration.

◆ getDepth()

int TYPO3\CMS\Linkvalidator\Task\ValidatorTask::getDepth ( )

Get the value of the protected property depth

Returns
‪int Level of pages the task should check

Definition at line 185 of file ValidatorTask.php.

References TYPO3\CMS\Linkvalidator\Task\ValidatorTask\$depth.

Referenced by TYPO3\CMS\Linkvalidator\Task\ValidatorTask\getAdditionalInformation().

◆ getEmail()

string TYPO3\CMS\Linkvalidator\Task\ValidatorTask::getEmail ( )

Get the value of the protected property email

Returns
‪string Email address to which an email report is sent

Definition at line 125 of file ValidatorTask.php.

References TYPO3\CMS\Linkvalidator\Task\ValidatorTask\$email.

Referenced by TYPO3\CMS\Linkvalidator\Task\ValidatorTask\getAdditionalInformation().

◆ getEmailOnBrokenLinkOnly()

bool TYPO3\CMS\Linkvalidator\Task\ValidatorTask::getEmailOnBrokenLinkOnly ( )

Get the value of the protected property emailOnBrokenLinkOnly

Returns
‪bool Whether to send an email, if new broken links were found

Definition at line 145 of file ValidatorTask.php.

References TYPO3\CMS\Linkvalidator\Task\ValidatorTask\$emailOnBrokenLinkOnly.

◆ getEmailTemplateFile()

string TYPO3\CMS\Linkvalidator\Task\ValidatorTask::getEmailTemplateFile ( )

Get the value of the protected property emailTemplateFile

Returns
‪string Template to be used for the email

Definition at line 205 of file ValidatorTask.php.

References TYPO3\CMS\Linkvalidator\Task\ValidatorTask\$emailTemplateFile.

◆ getLinkTypes()

array TYPO3\CMS\Linkvalidator\Task\ValidatorTask::getLinkTypes ( array  $modTS)
protected

Get the list of linkTypes to parse in modTSconfig

Parameters
array$modTS‪mod.linkvalidator TSconfig array
Returns
‪array $linkTypes list of link types

Definition at line 402 of file ValidatorTask.php.

References $GLOBALS, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Linkvalidator\Task\ValidatorTask\checkPageLinks().

◆ getPage()

int TYPO3\CMS\Linkvalidator\Task\ValidatorTask::getPage ( )

Get the value of the protected property page

Returns
‪int UID of the start page for this task

Definition at line 165 of file ValidatorTask.php.

References TYPO3\CMS\Linkvalidator\Task\ValidatorTask\$page.

Referenced by TYPO3\CMS\Linkvalidator\Task\ValidatorTask\getAdditionalInformation().

◆ getSearchField()

array TYPO3\CMS\Linkvalidator\Task\ValidatorTask::getSearchField ( array  $modTS)
protected

Get the list of fields to parse in modTSconfig

Parameters
array$modTS‪mod.linkvalidator TSconfig array
Returns
‪array $searchFields List of fields

Definition at line 383 of file ValidatorTask.php.

References $fields, and TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode().

Referenced by TYPO3\CMS\Linkvalidator\Task\ValidatorTask\checkPageLinks().

◆ loadModTsConfig()

array TYPO3\CMS\Linkvalidator\Task\ValidatorTask::loadModTsConfig (   $page)
protected

◆ reportEmail()

bool TYPO3\CMS\Linkvalidator\Task\ValidatorTask::reportEmail (   $pageSections,
array  $modTsConfig 
)
protected

◆ setCliArguments()

TYPO3\CMS\Linkvalidator\Task\ValidatorTask::setCliArguments ( )
protected

◆ setConfiguration()

TYPO3\CMS\Linkvalidator\Task\ValidatorTask::setConfiguration (   $configuration)

Set the value of the private property configuration

Parameters
array$configuration‪specific TSconfig for this task

Definition at line 235 of file ValidatorTask.php.

References TYPO3\CMS\Linkvalidator\Task\ValidatorTask\$configuration.

◆ setDepth()

TYPO3\CMS\Linkvalidator\Task\ValidatorTask::setDepth (   $depth)

Set the value of the private property depth

Parameters
int$depth‪Level of pages the task should check

Definition at line 195 of file ValidatorTask.php.

References TYPO3\CMS\Linkvalidator\Task\ValidatorTask\$depth.

◆ setEmail()

TYPO3\CMS\Linkvalidator\Task\ValidatorTask::setEmail (   $email)

Set the value of the private property email.

Parameters
string$email‪Email address to which an email report is sent

Definition at line 135 of file ValidatorTask.php.

References TYPO3\CMS\Linkvalidator\Task\ValidatorTask\$email.

◆ setEmailOnBrokenLinkOnly()

TYPO3\CMS\Linkvalidator\Task\ValidatorTask::setEmailOnBrokenLinkOnly (   $emailOnBrokenLinkOnly)

Set the value of the private property emailOnBrokenLinkOnly

Parameters
bool$emailOnBrokenLinkOnly‪Only send an email, if new broken links were found

Definition at line 155 of file ValidatorTask.php.

References TYPO3\CMS\Linkvalidator\Task\ValidatorTask\$emailOnBrokenLinkOnly.

◆ setEmailTemplateFile()

TYPO3\CMS\Linkvalidator\Task\ValidatorTask::setEmailTemplateFile (   $emailTemplateFile)

Set the value of the private property emailTemplateFile

Parameters
string$emailTemplateFile‪Template to be used for the email

Definition at line 215 of file ValidatorTask.php.

References TYPO3\CMS\Linkvalidator\Task\ValidatorTask\$emailTemplateFile.

◆ setPage()

TYPO3\CMS\Linkvalidator\Task\ValidatorTask::setPage (   $page)

Set the value of the private property page

Parameters
int$page‪UID of the start page for this task.

Definition at line 175 of file ValidatorTask.php.

References TYPO3\CMS\Linkvalidator\Task\ValidatorTask\$page.

Member Data Documentation

◆ $brokenLinkRepository

BrokenLinkRepository TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$brokenLinkRepository
protected

Definition at line 118 of file ValidatorTask.php.

◆ $configuration

array TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$configuration = array( )
protected

◆ $countInARun

int TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$countInARun
protected

◆ $depth

int TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$depth
protected

◆ $email

string TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$email
protected

Email address to which an email report is sent

Definition at line 100 of file ValidatorTask.php.

Referenced by TYPO3\CMS\Linkvalidator\Task\ValidatorTask\getEmail(), and TYPO3\CMS\Linkvalidator\Task\ValidatorTask\setEmail().

◆ $emailOnBrokenLinkOnly

bool TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$emailOnBrokenLinkOnly
protected

◆ $emailTemplateFile

string TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$emailTemplateFile
protected

◆ $isDifferentToLastRun

bool TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$isDifferentToLastRun
protected

Shows if number of result was different from the result of the last check

Definition at line 76 of file ValidatorTask.php.

◆ $languageFile

string TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$languageFile = 'LLL:EXT:linkvalidator/Resources/Private/Language/locallang.xlf'
protected

Default language file of the extension linkvalidator

Definition at line 116 of file ValidatorTask.php.

◆ $oldTotalBrokenLink

int TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$oldTotalBrokenLink = 0
protected

Total number of broken links from the last run

Definition at line 58 of file ValidatorTask.php.

Referenced by TYPO3\CMS\Linkvalidator\Task\ValidatorTask\reportEmail().

◆ $page

◆ $sleepAfterFinish

int TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$sleepAfterFinish
protected

◆ $sleepTime

int TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$sleepTime
protected

◆ $templateMail

string TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$templateMail
protected

Mail template fetched from the given template file

Definition at line 64 of file ValidatorTask.php.

◆ $templateService

MarkerBasedTemplateService TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$templateService
protected

Definition at line 110 of file ValidatorTask.php.

◆ $totalBrokenLink

int TYPO3\CMS\Linkvalidator\Task\ValidatorTask::$totalBrokenLink = 0
protected

Total number of broken links

Definition at line 52 of file ValidatorTask.php.

Referenced by TYPO3\CMS\Linkvalidator\Task\ValidatorTask\reportEmail().