‪TYPO3CMS  10.4
TYPO3\CMS\Scheduler\Controller\SchedulerModuleController Class Reference

Public Member Functions

 __construct ()
 
ResponseInterface mainAction (ServerRequestInterface $request)
 
Action getCurrentAction ()
 

Protected Member Functions

 getModuleMenu ()
 
string getModuleContent (Action $previousAction)
 
string checkScreenAction ()
 
string infoScreenAction ()
 
 deleteTask ()
 
 stopTask ()
 
 toggleDisableAction ()
 
 setNextExecutionTimeAction ()
 
string editTaskAction ()
 
string getBrowseButton ($fieldID, array $fieldInfo)
 
 executeTasks ()
 
string listTasksAction ()
 
string makeStatusLabel (array $labels)
 
 saveTask ()
 
bool preprocessData ()
 
int convertToTimestamp (string $input)
 
 addMessage ($message, $severity=FlashMessage::OK)
 
array getRegisteredClasses ()
 
array getRegisteredTaskGroups ()
 
 getButtons (ServerRequestInterface $request)
 
 setCurrentAction (Action $action)
 
string getServerTime ()
 
LanguageService getLanguageService ()
 
TYPO3 CMS Core Authentication BackendUserAuthentication getBackendUser ()
 
PageRenderer getPageRenderer ()
 

Protected Attributes

array $submittedData = array( )
 
array $messages = array( )
 
string $cshKey = '_MOD_system_txschedulerM1'
 
Scheduler $scheduler
 
string $backendTemplatePath = ''
 
StandaloneView $view
 
string $moduleUri
 
ModuleTemplate $moduleTemplate
 
IconFactory $iconFactory
 
Action $action
 
array $MOD_MENU
 
array $MOD_SETTINGS = array( )
 

Detailed Description

Module 'TYPO3 Scheduler administration module' for the 'scheduler' extension.

This class is a specific Backend controller implementation and is not considered part of the Public TYPO3 API.

Definition at line 55 of file SchedulerModuleController.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ addMessage()

◆ checkScreenAction()

◆ convertToTimestamp()

int TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::convertToTimestamp ( string  $input)
protected

Convert input to DateTime and retrieve timestamp

Parameters
string$input
Returns
‪int

Definition at line 1211 of file SchedulerModuleController.php.

Referenced by TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\preprocessData().

◆ deleteTask()

◆ editTaskAction()

◆ executeTasks()

◆ getBackendUser()

TYPO3 CMS Core Authentication BackendUserAuthentication TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::getBackendUser ( )
protected

Returns the global BackendUserAuthentication object.

Returns
‪\TYPO3\CMS\Core\Authentication\BackendUserAuthentication

Definition at line 1401 of file SchedulerModuleController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\deleteTask(), and TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\saveTask().

◆ getBrowseButton()

string TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::getBrowseButton (   $fieldID,
array  $fieldInfo 
)
protected
Parameters
string$fieldID‪The id of the field witch contains the page id
array$fieldInfo‪The array with the field info, contains the page title shown beside the button
Returns
‪string HTML code for the browse button

Definition at line 713 of file SchedulerModuleController.php.

References TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getLanguageService(), and TYPO3\CMS\Core\Imaging\Icon\SIZE_SMALL.

Referenced by TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\editTaskAction().

◆ getButtons()

◆ getCurrentAction()

Action TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::getCurrentAction ( )

Get the current action

Returns
‪Action

Definition at line 181 of file SchedulerModuleController.php.

References TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\$action.

Referenced by TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\editTaskAction(), TYPO3\CMS\Recycler\Task\CleanerFieldProvider\getAdditionalFields(), TYPO3\CMS\Scheduler\Example\TestTaskAdditionalFieldProvider\getAdditionalFields(), TYPO3\CMS\Scheduler\Task\CachingFrameworkGarbageCollectionAdditionalFieldProvider\getAdditionalFields(), TYPO3\CMS\Scheduler\Example\SleepTaskAdditionalFieldProvider\getAdditionalFields(), TYPO3\CMS\Scheduler\Task\OptimizeDatabaseTableAdditionalFieldProvider\getAdditionalFields(), TYPO3\CMS\Linkvalidator\Task\ValidatorTaskAdditionalFieldProvider\getAdditionalFields(), TYPO3\CMS\Scheduler\Task\RecyclerGarbageCollectionAdditionalFieldProvider\getAdditionalFields(), TYPO3\CMS\Reports\Task\SystemStatusUpdateTaskNotificationEmailField\getAdditionalFields(), TYPO3\CMS\Scheduler\Task\TableGarbageCollectionAdditionalFieldProvider\getAllTablesAdditionalField(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getButtons(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getModuleContent(), TYPO3\CMS\Scheduler\Task\TableGarbageCollectionAdditionalFieldProvider\getNumberOfDaysAdditionalField(), TYPO3\CMS\Scheduler\Task\IpAnonymizationAdditionalFieldProvider\getTableAdditionalField(), and TYPO3\CMS\Scheduler\Task\TableGarbageCollectionAdditionalFieldProvider\getTableAdditionalField().

◆ getLanguageService()

◆ getModuleContent()

string TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::getModuleContent ( Action  $previousAction)
protected

Generate the module's content

Parameters
Action$previousAction
Returns
‪string HTML of the module's main content

Definition at line 224 of file SchedulerModuleController.php.

References TYPO3\CMS\Scheduler\Task\Enumeration\Action\ADD, TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\addMessage(), TYPO3\CMS\Core\Type\Enumeration\cast(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\checkScreenAction(), TYPO3\CMS\Scheduler\Task\Enumeration\Action\DELETE, TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\deleteTask(), TYPO3\CMS\Scheduler\Task\Enumeration\Action\EDIT, TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\editTaskAction(), TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR, TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\executeTasks(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getCurrentAction(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getLanguageService(), TYPO3\CMS\Core\Localization\LanguageService\getLL(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\infoScreenAction(), TYPO3\CMS\Scheduler\Task\Enumeration\Action\LIST, TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\listTasksAction(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\preprocessData(), TYPO3\CMS\Scheduler\Task\Enumeration\Action\SAVE, TYPO3\CMS\Scheduler\Task\Enumeration\Action\SAVE_CLOSE, TYPO3\CMS\Scheduler\Task\Enumeration\Action\SAVE_NEW, TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\saveTask(), TYPO3\CMS\Scheduler\Task\Enumeration\Action\SET_NEXT_EXECUTION_TIME, TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\setCurrentAction(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\setNextExecutionTimeAction(), TYPO3\CMS\Scheduler\Task\Enumeration\Action\STOP, TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\stopTask(), TYPO3\CMS\Scheduler\Task\Enumeration\Action\TOGGLE_HIDDEN, and TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\toggleDisableAction().

Referenced by TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\mainAction().

◆ getModuleMenu()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::getModuleMenu ( )
protected

Generates the action menu

Definition at line 189 of file SchedulerModuleController.php.

Referenced by TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\mainAction().

◆ getPageRenderer()

◆ getRegisteredClasses()

array TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::getRegisteredClasses ( )
protected

This method fetches a list of all classes that have been registered with the Scheduler For each item the following information is provided, as an associative array:

['extension'] => Key of the extension which provides the class ['filename'] => Path to the file containing the class ['title'] => String (possibly localized) containing a human-readable name for the class ['provider'] => Name of class that implements the interface for additional fields, if necessary

The name of the class itself is used as the key of the list array

Returns
‪array List of registered classes

Definition at line 1246 of file SchedulerModuleController.php.

References $GLOBALS, TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getLanguageService(), and TYPO3\CMS\Core\Localization\LanguageService\sL().

Referenced by TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\editTaskAction(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\executeTasks(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getButtons(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\infoScreenAction(), and TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\listTasksAction().

◆ getRegisteredTaskGroups()

array TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::getRegisteredTaskGroups ( )
protected

This method fetches list of all group that have been registered with the Scheduler

Returns
‪array List of registered groups

Definition at line 1267 of file SchedulerModuleController.php.

Referenced by TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\editTaskAction(), and TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\listTasksAction().

◆ getServerTime()

string TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::getServerTime ( )
protected

◆ infoScreenAction()

string TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::infoScreenAction ( )
protected

This method gathers information about all available task classes and displays it

Returns
‪string html

Definition at line 389 of file SchedulerModuleController.php.

References TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getRegisteredClasses().

Referenced by TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getModuleContent().

◆ listTasksAction()

◆ mainAction()

ResponseInterface TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::mainAction ( ServerRequestInterface  $request)

◆ makeStatusLabel()

string TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::makeStatusLabel ( array  $labels)
protected

Generates bootstrap labels containing the label statuses

Parameters
array$labels
Returns
‪string

Definition at line 995 of file SchedulerModuleController.php.

◆ preprocessData()

◆ saveTask()

◆ setCurrentAction()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::setCurrentAction ( Action  $action)
protected

◆ setNextExecutionTimeAction()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::setNextExecutionTimeAction ( )
protected

Sets the next execution time of the submitted task to now

Definition at line 487 of file SchedulerModuleController.php.

Referenced by TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getModuleContent().

◆ stopTask()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::stopTask ( )
protected

Clears the registered running executions from the task Note that this doesn't actually stop the running script. It just unmarks all executions.

Todo:
‪find a way to really kill the running task

Definition at line 446 of file SchedulerModuleController.php.

References TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\addMessage(), TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR, TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getLanguageService(), and TYPO3\CMS\Core\Messaging\AbstractMessage\WARNING.

Referenced by TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getModuleContent().

◆ toggleDisableAction()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::toggleDisableAction ( )
protected

Toggles the disabled state of the submitted task

Definition at line 472 of file SchedulerModuleController.php.

References TYPO3\CMS\Scheduler\Task\AbstractTask\TYPE_SINGLE.

Referenced by TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getModuleContent().

Member Data Documentation

◆ $action

Action TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::$action
protected

◆ $backendTemplatePath

string TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::$backendTemplatePath = ''
protected

Definition at line 81 of file SchedulerModuleController.php.

◆ $cshKey

string TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::$cshKey = '_MOD_system_txschedulerM1'
protected

Key of the CSH file

Definition at line 73 of file SchedulerModuleController.php.

◆ $iconFactory

IconFactory TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::$iconFactory
protected

Definition at line 99 of file SchedulerModuleController.php.

◆ $messages

array TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::$messages = array( )
protected

Array containing all messages issued by the application logic Contains the error's severity and the message itself

Definition at line 69 of file SchedulerModuleController.php.

◆ $MOD_MENU

array TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::$MOD_MENU
protected
Initial value:
= array(
'function' => []
)

The module menu items array. Each key represents a key for which values can range between the items in the array of that key.

Definition at line 109 of file SchedulerModuleController.php.

◆ $MOD_SETTINGS

array TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::$MOD_SETTINGS = array( )
protected

Current settings for the keys of the MOD_MENU array

Definition at line 117 of file SchedulerModuleController.php.

◆ $moduleTemplate

ModuleTemplate TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::$moduleTemplate
protected

ModuleTemplate Container

Definition at line 95 of file SchedulerModuleController.php.

◆ $moduleUri

string TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::$moduleUri
protected

Base URI of scheduler module

Definition at line 89 of file SchedulerModuleController.php.

◆ $scheduler

Scheduler TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::$scheduler
protected

Local scheduler instance

Definition at line 77 of file SchedulerModuleController.php.

◆ $submittedData

array TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::$submittedData = array( )
protected

Array containing submitted data when editing or adding a task

Definition at line 62 of file SchedulerModuleController.php.

◆ $view

StandaloneView TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::$view
protected

Definition at line 85 of file SchedulerModuleController.php.