SchedulerModuleController
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.
Table of Contents
Properties
- $action : Action
- $backendTemplatePath : string
- $cshKey : string
- $iconFactory : IconFactory
- $messages : array<string|int, mixed>
- Array containing all messages issued by the application logic Contains the error's severity and the message itself
- $MOD_MENU : array<string|int, mixed>
- The module menu items array. Each key represents a key for which values can range between the items in the array of that key.
- $MOD_SETTINGS : array<string|int, mixed>
- Current settings for the keys of the MOD_MENU array
- $moduleTemplate : ModuleTemplate
- ModuleTemplate Container
- $moduleTemplateFactory : ModuleTemplateFactory
- $moduleUri : string
- $pageRenderer : PageRenderer
- $scheduler : Scheduler
- $submittedData : array<string|int, mixed>
- Array containing submitted data when editing or adding a task
- $uriBuilder : UriBuilder
- $view : StandaloneView
Methods
- __construct() : mixed
- getCurrentAction() : Action
- Get the current action
- mainAction() : ResponseInterface
- Injects the request object for the current request or subrequest
- addMessage() : mixed
- This method is used to add a message to the internal queue
- checkScreenAction() : string
- This method displays the result of a number of checks on whether the Scheduler is ready to run or running properly
- convertToTimestamp() : int
- Convert input to DateTime and retrieve timestamp
- deleteTask() : void
- Delete a task from the execution queue
- editTaskAction() : string
- Return a form to add a new task or edit an existing one
- executeTasks() : void
- Execute all selected tasks
- getBackendUser() : BackendUserAuthentication
- Returns the global BackendUserAuthentication object.
- getBrowseButton() : string
- getButtons() : void
- Create the panel of buttons for submitting the form or otherwise perform operations.
- getLanguageService() : LanguageService
- Returns the Language Service
- getModuleContent() : string
- Generate the module's content
- getModuleMenu() : void
- Generates the action menu
- getRegisteredClasses() : array<string|int, mixed>
- 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:
- getRegisteredTaskGroups() : array<string|int, mixed>
- This method fetches list of all group that have been registered with the Scheduler
- getSectionTitle() : string
- getServerTime() : string
- infoScreenAction() : string
- This method gathers information about all available task classes and displays it
- listTasksAction() : string
- Assemble display of list of scheduled tasks
- makeStatusLabel() : string
- Generates bootstrap labels containing the label statuses
- preprocessData() : bool
- Checks the submitted data and performs some pre-processing on it
- saveTask() : void
- Saves a task specified in the backend form to the database
- setCurrentAction() : void
- Set the current action
- setNextExecutionTimeAction() : void
- Sets the next execution time of the submitted task to now
- stopTask() : void
- Clears the registered running executions from the task Note that this doesn't actually stop the running script. It just unmarks all executions.
- toggleDisableAction() : void
- Toggles the disabled state of the submitted task
Properties
$action
protected
Action
$action
$backendTemplatePath
protected
string
$backendTemplatePath
= ''
$cshKey
protected
string
$cshKey
= '_MOD_system_txschedulerM1'
Key of the CSH file
$iconFactory
protected
IconFactory
$iconFactory
$messages
Array containing all messages issued by the application logic Contains the error's severity and the message itself
protected
array<string|int, mixed>
$messages
= []
$MOD_MENU
The module menu items array. Each key represents a key for which values can range between the items in the array of that key.
protected
array<string|int, mixed>
$MOD_MENU
= ['function' => []]
$MOD_SETTINGS
Current settings for the keys of the MOD_MENU array
protected
array<string|int, mixed>
$MOD_SETTINGS
= []
$moduleTemplate
ModuleTemplate Container
protected
ModuleTemplate
$moduleTemplate
$moduleTemplateFactory
protected
ModuleTemplateFactory
$moduleTemplateFactory
$moduleUri
protected
string
$moduleUri
Base URI of scheduler module
$pageRenderer
protected
PageRenderer
$pageRenderer
$scheduler
protected
Scheduler
$scheduler
$submittedData
Array containing submitted data when editing or adding a task
protected
array<string|int, mixed>
$submittedData
= []
$uriBuilder
protected
UriBuilder
$uriBuilder
$view
protected
StandaloneView
$view
Methods
__construct()
public
__construct(Scheduler $scheduler, IconFactory $iconFactory, PageRenderer $pageRenderer, UriBuilder $uriBuilder, ModuleTemplateFactory $moduleTemplateFactory) : mixed
Parameters
- $scheduler : Scheduler
- $iconFactory : IconFactory
- $pageRenderer : PageRenderer
- $uriBuilder : UriBuilder
- $moduleTemplateFactory : ModuleTemplateFactory
getCurrentAction()
Get the current action
public
getCurrentAction() : Action
Return values
ActionmainAction()
Injects the request object for the current request or subrequest
public
mainAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
-
the current request
Return values
ResponseInterface —the response with the content
addMessage()
This method is used to add a message to the internal queue
protected
addMessage(string $message[, int $severity = FlashMessage::OK ]) : mixed
Parameters
- $message : string
-
The message itself
- $severity : int = FlashMessage::OK
-
Message level (according to FlashMessage class constants)
checkScreenAction()
This method displays the result of a number of checks on whether the Scheduler is ready to run or running properly
protected
checkScreenAction() : string
Return values
string —Further information
convertToTimestamp()
Convert input to DateTime and retrieve timestamp
protected
convertToTimestamp(string $input) : int
Parameters
- $input : string
Return values
intdeleteTask()
Delete a task from the execution queue
protected
deleteTask() : void
editTaskAction()
Return a form to add a new task or edit an existing one
protected
editTaskAction(string $requestUri) : string
Parameters
- $requestUri : string
Return values
string —HTML form to add or edit a task
executeTasks()
Execute all selected tasks
protected
executeTasks() : void
getBackendUser()
Returns the global BackendUserAuthentication object.
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetBrowseButton()
protected
getBrowseButton(string $fieldID, array<string|int, mixed> $fieldInfo) : string
Parameters
- $fieldID : string
-
The id of the field witch contains the page id
- $fieldInfo : array<string|int, mixed>
-
The array with the field info, contains the page title shown beside the button
Return values
string —HTML code for the browse button
getButtons()
Create the panel of buttons for submitting the form or otherwise perform operations.
protected
getButtons(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
getLanguageService()
Returns the Language Service
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetModuleContent()
Generate the module's content
protected
getModuleContent(Action $previousAction, string $requestUri) : string
Parameters
- $previousAction : Action
- $requestUri : string
Return values
string —HTML of the module's main content
getModuleMenu()
Generates the action menu
protected
getModuleMenu() : void
getRegisteredClasses()
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:
protected
getRegisteredClasses() : array<string|int, mixed>
['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
Return values
array<string|int, mixed> —List of registered classes
getRegisteredTaskGroups()
This method fetches list of all group that have been registered with the Scheduler
protected
getRegisteredTaskGroups() : array<string|int, mixed>
Return values
array<string|int, mixed> —List of registered groups
getSectionTitle()
protected
getSectionTitle() : string
Return values
stringgetServerTime()
protected
getServerTime() : string
Return values
stringinfoScreenAction()
This method gathers information about all available task classes and displays it
protected
infoScreenAction() : string
Return values
string —html
listTasksAction()
Assemble display of list of scheduled tasks
protected
listTasksAction() : string
Return values
string —Table of pending tasks
makeStatusLabel()
Generates bootstrap labels containing the label statuses
protected
makeStatusLabel(array<string|int, mixed> $labels) : string
Parameters
- $labels : array<string|int, mixed>
Return values
stringpreprocessData()
Checks the submitted data and performs some pre-processing on it
protected
preprocessData() : bool
Return values
bool —true if everything was ok, false otherwise
saveTask()
Saves a task specified in the backend form to the database
protected
saveTask() : void
setCurrentAction()
Set the current action
protected
setCurrentAction(Action $action) : void
Parameters
- $action : Action
setNextExecutionTimeAction()
Sets the next execution time of the submitted task to now
protected
setNextExecutionTimeAction() : void
stopTask()
Clears the registered running executions from the task Note that this doesn't actually stop the running script. It just unmarks all executions.
protected
stopTask() : void
Tags
toggleDisableAction()
Toggles the disabled state of the submitted task
protected
toggleDisableAction() : void