MaestroStartTask.php in Maestro 3.x
File
src/Plugin/EngineTasks/MaestroStartTask.php
View source
<?php
namespace Drupal\maestro\Plugin\EngineTasks;
use Drupal\Core\Plugin\PluginBase;
use Drupal\maestro\MaestroEngineTaskInterface;
use Drupal\maestro\MaestroTaskTrait;
use Drupal\Core\Form\FormStateInterface;
use Drupal\maestro\Form\MaestroExecuteInteractive;
class MaestroStartTask extends PluginBase implements MaestroEngineTaskInterface {
use MaestroTaskTrait;
public function __construct($configuration = NULL) {
if (is_array($configuration)) {
$this->processID = $configuration[0];
$this->queueID = $configuration[1];
}
}
public function isInteractive() {
return FALSE;
}
public function shortDescription() {
return t('Start Task');
}
public function description() {
return $this
->t('Start Task.');
}
public function getPluginId() {
return 'MaestroStart';
}
public function getTaskColours() {
return '#00ff00';
}
public function execute() {
return TRUE;
}
public function getExecutableForm($modal, MaestroExecuteInteractive $parent) {
}
public function handleExecuteSubmit(array &$form, FormStateInterface $form_state) {
}
public function getTaskEditForm(array $task, $templateMachineName) {
$form = [
'#markup' => t('There is nothing to edit on a Start Task'),
];
return $form;
}
public function validateTaskEditForm(array &$form, FormStateInterface $form_state) {
}
public function prepareTaskForSave(array &$form, FormStateInterface $form_state, array &$task) {
}
public function performValidityCheck(array &$validation_failure_tasks, array &$validation_information_tasks, array $task) {
}
public function getTemplateBuilderCapabilities() {
return [
'drawlineto',
'removelines',
];
}
}