interface MaestroEngineTaskInterface in Maestro 8.2
Same name and namespace in other branches
- 3.x src/MaestroEngineTaskInterface.php \Drupal\maestro\MaestroEngineTaskInterface
The Maestro Engine Task Interface.
Hierarchy
- interface \Drupal\Core\Executable\ExecutableInterface; interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\maestro\MaestroEngineTaskInterface
Expanded class hierarchy of MaestroEngineTaskInterface
All classes that implement MaestroEngineTaskInterface
14 files declare their use of MaestroEngineTaskInterface
- MaestroAndTask.php in src/
Plugin/ EngineTasks/ MaestroAndTask.php - MaestroBatchFunctionTask.php in src/
Plugin/ EngineTasks/ MaestroBatchFunctionTask.php - MaestroContentTypeTask.php in src/
Plugin/ EngineTasks/ MaestroContentTypeTask.php - MaestroEndTask.php in src/
Plugin/ EngineTasks/ MaestroEndTask.php - MaestroIfTask.php in src/
Plugin/ EngineTasks/ MaestroIfTask.php
File
- src/
MaestroEngineTaskInterface.php, line 13
Namespace
Drupal\maestroView source
interface MaestroEngineTaskInterface extends ExecutableInterface, PluginInspectionInterface {
/**
* Returns TRUE or FALSE to denote if this task has an interactive interface that needs to be shown in the Task Console
* and for any other requirements of the task.
*/
public function isInteractive();
/**
* Get the task's short description. Useful for things like labels.
*/
public function shortDescription();
/**
* Longer description. This generally follows the short Description but can be used to be more descriptive if you
* wish to surface this description in a UI element.
*/
public function description();
/**
* Returns the task's defined colours. This is useful if you want to let the tasks decide on what colours to paint themselves in the UI.
*/
public function getTaskColours();
/**
* Gets the Maestro executable form for a task console.
*
* @return array
* Array Must return form declaration fields if this task is interactive or not.
*
* @param string $modal
* Defines if the form is a modal form or not.
* @param Drupal\maestro\Form\MaestroExecuteInteractive $parent
* Parent class for using modal callbacks to the interactive form base if needed.
*/
public function getExecutableForm($modal, MaestroExecuteInteractive $parent);
/**
* Interactive tasks, or tasks that signal themselves as requiring human interaction will have the resulting form submissions
* sent to their own handler for processing to determine if the task should be completed or not or to carry out any task
* processing that may have to be done.
*/
public function handleExecuteSubmit(array &$form, FormStateInterface $form_state);
/**
* Method to allow a task to add their own fields to the task edit form.
*
* @param array $task
* This is the array representation of the task from the configuration entity.
* @param string $templateMachineName
* The Maestro template machine name.
*
* @return array
* Array Must return form declaration fields for the task editor
*/
public function getTaskEditForm(array $task, $templateMachineName);
/**
* This method must be called by the template builder in order to validate the form entry values before saving.
*/
public function validateTaskEditForm(array &$form, FormStateInterface $form_state);
/**
* The specific task's manipulation of the values to save for a template save.
*
* @param array $form
* The form.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* The form's form state.
* @param array $task
* The fully loaded task array from the template.
*/
public function prepareTaskForSave(array &$form, FormStateInterface $form_state, array &$task);
/**
* Lets the task perform validation on itself. If the task is missing any internal requirements, it can flag itself as having an issue.
* Return array MUST be in the format of array(
* 'taskID' => the task machine name,
* 'taskLabel' => the human readable label for the task,
* 'reason' => the reason for the failure
* )
*
* @param array $validation_failure_tasks
* The array of other validation failures.
* @param array $validation_information_tasks
* The array of informational messages.
* @param array $task
* The passed-in fully-loaded task from the template (array)
*/
public function performValidityCheck(array &$validation_failure_tasks, array &$validation_information_tasks, array $task);
/**
* Returns an array of consistenly keyed array elements that define what this task can do in the template builder.
* Elements are:
* edit, drawlineto, drawfalselineto, removelines, remove.
*/
public function getTemplateBuilderCapabilities();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ExecutableInterface:: |
public | function | Executes the plugin. | 20 |
MaestroEngineTaskInterface:: |
public | function | Longer description. This generally follows the short Description but can be used to be more descriptive if you wish to surface this description in a UI element. | 14 |
MaestroEngineTaskInterface:: |
public | function | Gets the Maestro executable form for a task console. | 14 |
MaestroEngineTaskInterface:: |
public | function | Returns the task's defined colours. This is useful if you want to let the tasks decide on what colours to paint themselves in the UI. | 14 |
MaestroEngineTaskInterface:: |
public | function | Method to allow a task to add their own fields to the task edit form. | 14 |
MaestroEngineTaskInterface:: |
public | function | Returns an array of consistenly keyed array elements that define what this task can do in the template builder. Elements are: edit, drawlineto, drawfalselineto, removelines, remove. | 14 |
MaestroEngineTaskInterface:: |
public | function | Interactive tasks, or tasks that signal themselves as requiring human interaction will have the resulting form submissions sent to their own handler for processing to determine if the task should be completed or not or to carry out any task processing… | 14 |
MaestroEngineTaskInterface:: |
public | function | Returns TRUE or FALSE to denote if this task has an interactive interface that needs to be shown in the Task Console and for any other requirements of the task. | 14 |
MaestroEngineTaskInterface:: |
public | function | Lets the task perform validation on itself. If the task is missing any internal requirements, it can flag itself as having an issue. Return array MUST be in the format of array( 'taskID' => the task machine name, 'taskLabel'… | 14 |
MaestroEngineTaskInterface:: |
public | function | The specific task's manipulation of the values to save for a template save. | 14 |
MaestroEngineTaskInterface:: |
public | function | Get the task's short description. Useful for things like labels. | 14 |
MaestroEngineTaskInterface:: |
public | function | This method must be called by the template builder in order to validate the form entry values before saving. | 14 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |