TaskService

Read onlyYes

Service class helping to retrieve data for EXT:scheduler

Internal

This is not a public API method, do not use in own extensions

Attributes
#[Autoconfigure]
$public: true

Table of Contents

Properties

$commandRegistry  : CommandRegistry
$tcaSchemaFactory  : TcaSchemaFactory

Methods

__construct()  : mixed
createNewTask()  : AbstractTask
getAdditionalFieldProviderForTask()  : AdditionalFieldProviderInterface|null
getAllTaskTypes()  : array<string|int, mixed>
getCategorizedTaskTypes()  : array<string|int, mixed>
getFieldsForRecord()  : array<string|int, mixed>
Native fields are added / managed via FormEngine + dataHandler, so this only returns additional fields from the task object that are needed.
getHumanReadableTaskName()  : string
getTaskDetailsFromTask()  : array<string|int, mixed>|null
getTaskDetailsFromTaskType()  : array<string|int, mixed>|null
getTaskTypesForTcaItems()  : array<string|int, mixed>
Used in FormEngine. Actually, this is only needed to task types can be "validated" by form data providers.
isTaskTypeRegistered()  : bool
prepareAdditionalFields()  : array<string|int, mixed>
Prepared additional fields from field providers for rendering.
setTaskDataFromRequest()  : void
getAvailableTaskTypes()  : 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:
getTimestampFromDateString()  : int
Convert input to DateTime and retrieve timestamp.

Properties

Methods

getAllTaskTypes()

public getAllTaskTypes([bool $includeNativeTypes = true ]) : array<string|int, mixed>
Parameters
$includeNativeTypes : bool = true
Return values
array<string|int, mixed>

getCategorizedTaskTypes()

public getCategorizedTaskTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getFieldsForRecord()

Native fields are added / managed via FormEngine + dataHandler, so this only returns additional fields from the task object that are needed.

public getFieldsForRecord(AbstractTask $task) : array<string|int, mixed>
Parameters
$task : AbstractTask
Return values
array<string|int, mixed>

getTaskDetailsFromTask()

public getTaskDetailsFromTask(AbstractTask $taskObject) : array<string|int, mixed>|null
Parameters
$taskObject : AbstractTask
Return values
array<string|int, mixed>|null

getTaskDetailsFromTaskType()

public getTaskDetailsFromTaskType(string $taskType) : array<string|int, mixed>|null
Parameters
$taskType : string
Return values
array<string|int, mixed>|null

getTaskTypesForTcaItems()

Used in FormEngine. Actually, this is only needed to task types can be "validated" by form data providers.

public getTaskTypesForTcaItems(array<string|int, mixed> &$config[, mixed $_ = null ][, bool $includeNativeItems = false ]) : array<string|int, mixed>

There is no possibility to "select" a task type in FormEngine. The field is a readonly information.

Parameters
$config : array<string|int, mixed>
$_ : mixed = null
$includeNativeItems : bool = false
Return values
array<string|int, mixed>

isTaskTypeRegistered()

public isTaskTypeRegistered(string $taskType) : bool
Parameters
$taskType : string
Return values
bool

prepareAdditionalFields()

Prepared additional fields from field providers for rendering.

public prepareAdditionalFields(string $taskType, array<string|int, mixed> $newAdditionalFields[, array<string|int, mixed> $currentAdditionalFields = [] ]) : array<string|int, mixed>
Parameters
$taskType : string
$newAdditionalFields : array<string|int, mixed>
$currentAdditionalFields : array<string|int, mixed> = []
Return values
array<string|int, mixed>

setTaskDataFromRequest()

public setTaskDataFromRequest(AbstractTask $task, array<string|int, mixed> $incomingData) : void
Parameters
$task : AbstractTask
$incomingData : array<string|int, mixed>

getAvailableTaskTypes()

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 getAvailableTaskTypes([bool $includeNativeTypes = true ]) : array<string|int, mixed>

['className'] => Name of the task PHP class ['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

Parameters
$includeNativeTypes : bool = true
Return values
array<string|int, mixed>

getTimestampFromDateString()

Convert input to DateTime and retrieve timestamp.

protected getTimestampFromDateString(int|string $input) : int
Parameters
$input : int|string
Tags
throws
InvalidDateException
Return values
int

        
On this page

Search results