TYPO3  7.6
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
TableGarbageCollectionTask Class Reference
Inheritance diagram for TableGarbageCollectionTask:
AbstractTask

Public Member Functions

 execute ()
 
 getAdditionalInformation ()
 
- Public Member Functions inherited from AbstractTask
 __construct ()
 
 execute ()
 
 getAdditionalInformation ()
 
 setTaskUid ($id)
 
 getTaskUid ()
 
 getTaskTitle ()
 
 getTaskDescription ()
 
 getTaskClassName ()
 
 isDisabled ()
 
 setDisabled ($flag)
 
 setExecutionTime ($timestamp)
 
 getTaskGroup ()
 
 setTaskGroup ($taskGroup)
 
 getExecutionTime ()
 
 setDescription ($description)
 
 getDescription ()
 
 setScheduler ()
 
 unsetScheduler ()
 
 setExecution (\TYPO3\CMS\Scheduler\Execution $execution)
 
 getExecution ()
 
 getNextDueExecution ()
 
 areMultipleExecutionsAllowed ()
 
 isExecutionRunning ()
 
 markExecution ()
 
 unmarkExecution ($executionID,\Exception $failure=null)
 
 unmarkAllExecutions ()
 
 save ()
 
 stop ()
 
 remove ()
 

Public Attributes

 $allTables = false
 
 $numberOfDays = 180
 
 $table = ''
 

Protected Member Functions

 handleTable ($table, array $configuration)
 

Additional Inherited Members

- Protected Attributes inherited from AbstractTask
 $scheduler
 
 $taskUid
 
 $disabled = false
 
 $execution
 
 $executionTime = 0
 
 $description = ''
 
 $taskGroup
 

Detailed Description

Remove old entries from tables.

This task deletes rows from tables older than the given number of days.

Available tables must be registered in $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['scheduler']['tasks'][::class]['options']['tables'] See ext_localconf.php of scheduler extension for an example

Definition at line 26 of file TableGarbageCollectionTask.php.

Member Function Documentation

execute ( )

Execute garbage collection, called by scheduler.

Exceptions
\RuntimeExceptionIf configured table was not cleaned up
Returns
bool TRUE if task run was successful

Definition at line 49 of file TableGarbageCollectionTask.php.

References $GLOBALS, and TableGarbageCollectionTask\handleTable().

getAdditionalInformation ( )

This method returns the selected table as additional information

Returns
string Information to display

Definition at line 107 of file TableGarbageCollectionTask.php.

References $GLOBALS.

handleTable (   $table,
array  $configuration 
)
protected

Execute clean up of a specific table

Exceptions
\RuntimeExceptionIf table configuration is broken
Parameters
string$tableThe table to handle
array$configurationClean up configuration
Returns
bool TRUE if cleanup was successful

Definition at line 73 of file TableGarbageCollectionTask.php.

References $GLOBALS, TableGarbageCollectionTask\$table, and elseif.

Referenced by TableGarbageCollectionTask\execute().

Member Data Documentation

$allTables = false

Definition at line 31 of file TableGarbageCollectionTask.php.

$numberOfDays = 180

Definition at line 36 of file TableGarbageCollectionTask.php.

$table = ''