‪TYPO3CMS  ‪main
TYPO3\CMS\Recycler\Task\CleanerTask Class Reference
Inheritance diagram for TYPO3\CMS\Recycler\Task\CleanerTask:
TYPO3\CMS\Scheduler\Task\AbstractTask

Public Member Functions

bool execute ()
 
string getAdditionalInformation ()
 
 setPeriod ($period)
 
int getPeriod ()
 
int getPeriodAsTimestamp ()
 
 setTcaTables ($tcaTables=[])
 
array getTcaTables ()
 
- ‪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 null 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 object null getExecution ()
 
int getNextDueExecution ()
 
bool areMultipleExecutionsAllowed ()
 
bool save ()
 
 stop ()
 
int getType ()
 

Protected Member Functions

bool cleanTable ($tableName)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
 logException (\Exception $e)
 
 getLanguageService ()
 

Protected Attributes

int $period = 0
 
array $tcaTables = array( )
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Scheduler\Task\AbstractTask
TYPO3 CMS Scheduler Scheduler null $scheduler
 
int $taskUid = 0
 
bool $disabled = false
 
bool $runOnNextCronJob = false
 
Execution $execution
 
int $executionTime = 0
 
string $description = ''
 
int null $taskGroup = 0
 

Additional Inherited Members

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

Detailed Description

A task that should be run regularly that deletes deleted datasets from the DB.

This class is a specific scheduler task implementation and is not part of the Public TYPO3 API.

Definition at line 29 of file CleanerTask.php.

Member Function Documentation

◆ cleanTable()

bool TYPO3\CMS\Recycler\Task\CleanerTask::cleanTable (   $tableName)
protected

Executes the delete-query for the given table

Parameters
string$tableName
Returns
‪bool

Definition at line 64 of file CleanerTask.php.

References $GLOBALS, TYPO3\CMS\Recycler\Task\CleanerTask\getPeriodAsTimestamp(), and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

Referenced by TYPO3\CMS\Recycler\Task\CleanerTask\execute().

◆ execute()

bool TYPO3\CMS\Recycler\Task\CleanerTask::execute ( )

The main method of the task. Iterates through the tables and calls the cleaning function

Returns
‪bool Returns TRUE on successful execution, FALSE on error

Reimplemented from TYPO3\CMS\Scheduler\Task\AbstractTask.

Definition at line 45 of file CleanerTask.php.

References TYPO3\CMS\Recycler\Task\CleanerTask\cleanTable(), and TYPO3\CMS\Recycler\Task\CleanerTask\getTcaTables().

◆ getAdditionalInformation()

string TYPO3\CMS\Recycler\Task\CleanerTask::getAdditionalInformation ( )

Returns the information shown in the task-list

Returns
‪string Information-text fot the scheduler task-list

Reimplemented from TYPO3\CMS\Scheduler\Task\AbstractTask.

Definition at line 101 of file CleanerTask.php.

References TYPO3\CMS\Scheduler\Task\AbstractTask\getLanguageService(), TYPO3\CMS\Recycler\Task\CleanerTask\getPeriod(), and TYPO3\CMS\Recycler\Task\CleanerTask\getTcaTables().

◆ getPeriod()

int TYPO3\CMS\Recycler\Task\CleanerTask::getPeriod ( )

Returns the period after which a row is deleted

Returns
‪int

Definition at line 135 of file CleanerTask.php.

References TYPO3\CMS\Recycler\Task\CleanerTask\$period.

Referenced by TYPO3\CMS\Recycler\Task\CleanerTask\getAdditionalInformation(), and TYPO3\CMS\Recycler\Task\CleanerTask\getPeriodAsTimestamp().

◆ getPeriodAsTimestamp()

int TYPO3\CMS\Recycler\Task\CleanerTask::getPeriodAsTimestamp ( )

◆ getTcaTables()

array TYPO3\CMS\Recycler\Task\CleanerTask::getTcaTables ( )

Returns the TCA-tables which are cleaned

Returns
‪array

Definition at line 167 of file CleanerTask.php.

References TYPO3\CMS\Recycler\Task\CleanerTask\$tcaTables.

Referenced by TYPO3\CMS\Recycler\Task\CleanerTask\execute(), and TYPO3\CMS\Recycler\Task\CleanerTask\getAdditionalInformation().

◆ setPeriod()

TYPO3\CMS\Recycler\Task\CleanerTask::setPeriod (   $period)

Sets the period after which a row is deleted

Parameters
int$period

Definition at line 125 of file CleanerTask.php.

References TYPO3\CMS\Recycler\Task\CleanerTask\$period.

◆ setTcaTables()

TYPO3\CMS\Recycler\Task\CleanerTask::setTcaTables (   $tcaTables = [])

Sets the TCA-tables which are cleaned

Parameters
array$tcaTables

Definition at line 157 of file CleanerTask.php.

References TYPO3\CMS\Recycler\Task\CleanerTask\$tcaTables.

Member Data Documentation

◆ $period

int TYPO3\CMS\Recycler\Task\CleanerTask::$period = 0
protected

The time period, after which the rows are deleted

Definition at line 33 of file CleanerTask.php.

Referenced by TYPO3\CMS\Recycler\Task\CleanerTask\getPeriod(), and TYPO3\CMS\Recycler\Task\CleanerTask\setPeriod().

◆ $tcaTables

array TYPO3\CMS\Recycler\Task\CleanerTask::$tcaTables = array( )
protected