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

Public Member Functions

 __construct (protected readonly Scheduler $scheduler, protected readonly TaskSerializer $taskSerializer, protected readonly SchedulerTaskRepository $taskRepository, protected readonly IconFactory $iconFactory, protected readonly UriBuilder $uriBuilder, protected readonly ModuleTemplateFactory $moduleTemplateFactory, protected readonly Context $context, protected readonly TaskService $taskService,)
 
 handleRequest (ServerRequestInterface $request)
 
 getCurrentAction ()
 

Protected Member Functions

 deleteTask (ModuleTemplate $view, int $taskUid)
 
 stopTask (ModuleTemplate $view, int $taskUid)
 
 toggleDisabledFlag (ModuleTemplate $view, int $taskUid)
 
 renderAddTaskFormView (ModuleTemplate $view, ServerRequestInterface $request)
 
 renderEditTaskFormView (ModuleTemplate $view, ServerRequestInterface $request, ?int $taskUid=null)
 
 executeTasks (ModuleTemplate $view, string $taskUids)
 
 scheduleCrons (ModuleTemplate $view, string $taskUids)
 
 renderListTasksView (ModuleTemplate $view, ModuleData $moduleData)
 
 isSubmittedTaskDataValid (ModuleTemplate $view, ServerRequestInterface $request, bool $isNewTask)
 
 createTask (ModuleTemplate $view, ServerRequestInterface $request)
 
 updateTask (ModuleTemplate $view, ServerRequestInterface $request)
 
 setTaskDataFromRequest (AbstractTask $task, ServerRequestInterface $request)
 
 getTimestampFromDateString (string $input)
 
 getRegisteredTaskGroups ()
 
 addPreparedAdditionalFields (array $currentAdditionalFields, array $newAdditionalFields, string $class)
 
 addDocHeaderReloadButton (ModuleTemplate $moduleTemplate)
 
 addDocHeaderAddTaskButton (ModuleTemplate $moduleTemplate)
 
 addDocHeaderCloseAndSaveButtons (ModuleTemplate $moduleTemplate)
 
 addDocHeaderNewButton (ModuleTemplate $moduleTemplate)
 
 addDocHeaderDeleteButton (ModuleTemplate $moduleTemplate, int $taskUid)
 
 addDocHeaderShortcutButton (ModuleTemplate $moduleTemplate, string $name, string $action='', int $taskUid=0)
 
 getHumanReadableTaskName (AbstractTask $task)
 
 addMessage (ModuleTemplate $moduleTemplate, string $message, ContextualFeedbackSeverity $severity=ContextualFeedbackSeverity::OK)
 
 getLanguageService ()
 
 getBackendUser ()
 

Protected Attributes

SchedulerManagementAction $currentAction
 

Private Member Functions

 addDocHeaderAddTaskGroupButton (ModuleTemplate $moduleTemplate)
 
 getGroupsWithoutTasks (array $taskGroupsWithTasks)
 
 groupRemove (int $groupId)
 
 groupDisable (int $groupId, int $hidden)
 

Detailed Description

Scheduler backend module.

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

Definition at line 60 of file SchedulerModuleController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::__construct ( protected readonly Scheduler  $scheduler,
protected readonly TaskSerializer  $taskSerializer,
protected readonly SchedulerTaskRepository  $taskRepository,
protected readonly IconFactory  $iconFactory,
protected readonly UriBuilder  $uriBuilder,
protected readonly ModuleTemplateFactory  $moduleTemplateFactory,
protected readonly Context  $context,
protected readonly TaskService  $taskService 
)

Definition at line 64 of file SchedulerModuleController.php.

Member Function Documentation

◆ addDocHeaderAddTaskButton()

◆ addDocHeaderAddTaskGroupButton()

◆ addDocHeaderCloseAndSaveButtons()

◆ addDocHeaderDeleteButton()

◆ addDocHeaderNewButton()

◆ addDocHeaderReloadButton()

◆ addDocHeaderShortcutButton()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::addDocHeaderShortcutButton ( ModuleTemplate  $moduleTemplate,
string  $name,
string  $action = '',
int  $taskUid = 0 
)
protected

◆ addMessage()

◆ addPreparedAdditionalFields()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::addPreparedAdditionalFields ( array  $currentAdditionalFields,
array  $newAdditionalFields,
string  $class 
)
protected

◆ createTask()

◆ deleteTask()

◆ executeTasks()

◆ getBackendUser()

◆ getCurrentAction()

◆ getGroupsWithoutTasks()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::getGroupsWithoutTasks ( array  $taskGroupsWithTasks)
private

◆ getHumanReadableTaskName()

◆ getLanguageService()

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

Definition at line 969 of file SchedulerModuleController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\addDocHeaderAddTaskButton(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\addDocHeaderAddTaskGroupButton(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\addDocHeaderCloseAndSaveButtons(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\addDocHeaderDeleteButton(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\addDocHeaderNewButton(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\addDocHeaderReloadButton(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\addPreparedAdditionalFields(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\createTask(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\deleteTask(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\executeTasks(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\handleRequest(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\isSubmittedTaskDataValid(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\renderAddTaskFormView(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\renderEditTaskFormView(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\renderListTasksView(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\scheduleCrons(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\stopTask(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\toggleDisabledFlag(), and TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\updateTask().

◆ getRegisteredTaskGroups()

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

◆ getTimestampFromDateString()

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

◆ groupDisable()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::groupDisable ( int  $groupId,
int  $hidden 
)
private

◆ groupRemove()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::groupRemove ( int  $groupId)
private

◆ handleRequest()

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

Entry dispatcher method.

There are two arguments involved regarding main module routing:

  • ‪'action': add, edit, delete, toggleHidden, ...
  • ‪'CMD': "save", "close", "new" when adding / editing a task. A better naming would be "nextAction", but the split button ModuleTemplate and DocumentSaveActions.ts can not cope with a renaming here and need "CMD".

Definition at line 84 of file SchedulerModuleController.php.

References $GLOBALS, TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\createTask(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\deleteTask(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\executeTasks(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getLanguageService(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\groupDisable(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\groupRemove(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\isSubmittedTaskDataValid(), TYPO3\CMS\Scheduler\LIST, TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\renderAddTaskFormView(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\renderEditTaskFormView(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\renderListTasksView(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\scheduleCrons(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\stopTask(), TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\toggleDisabledFlag(), TYPO3\CMS\Frontend\Content\tryFrom, and TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\updateTask().

◆ isSubmittedTaskDataValid()

◆ renderAddTaskFormView()

◆ renderEditTaskFormView()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::renderEditTaskFormView ( ModuleTemplate  $view,
ServerRequestInterface  $request,
?int  $taskUid = null 
)
protected

◆ renderListTasksView()

◆ scheduleCrons()

◆ setTaskDataFromRequest()

◆ stopTask()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::stopTask ( ModuleTemplate  $view,
int  $taskUid 
)
protected

Clears the registered running executions from the task. Note this doesn't actually stop the running script. It just unmark execution.

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

Definition at line 252 of file SchedulerModuleController.php.

References TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\addMessage(), and TYPO3\CMS\Scheduler\Controller\SchedulerModuleController\getLanguageService().

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

◆ toggleDisabledFlag()

TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::toggleDisabledFlag ( ModuleTemplate  $view,
int  $taskUid 
)
protected

◆ updateTask()

Member Data Documentation

◆ $currentAction

SchedulerManagementAction TYPO3\CMS\Scheduler\Controller\SchedulerModuleController::$currentAction
protected