You are here

public function MaestroNonInteractiveExampleTask::performValidityCheck in Maestro 8.2

Same name and namespace in other branches
  1. 3.x modules/examples/maestro_noninteractive_task_plugin_example/src/Plugin/EngineTasks/MaestroNonInteractiveExampleTask.php \Drupal\maestro_noninteractive_task_plugin_example\Plugin\EngineTasks\MaestroNonInteractiveExampleTask::performValidityCheck()

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 )

Parameters

array $validation_failure_tasks: The array of other validation failures.

array $validation_information_tasks: The array of informational messages.

array $task: The passed-in fully-loaded task from the template (array)

Overrides MaestroEngineTaskInterface::performValidityCheck

File

modules/examples/maestro_noninteractive_task_plugin_example/src/Plugin/EngineTasks/MaestroNonInteractiveExampleTask.php, line 170

Class

MaestroNonInteractiveExampleTask
Maestro Non Interactive Example Task Plugin.

Namespace

Drupal\maestro_noninteractive_task_plugin_example\Plugin\EngineTasks

Code

public function performValidityCheck(array &$validation_failure_tasks, array &$validation_information_tasks, array $task) {

  /*
   * When you use a task in the template builder, it will be up to the task to provide any sort of debugging and validation
   * information to the end user.  Do you have a field that MUST be set in order for the task to execute?
   * How about a field that doesn't have the right values?  This is where you would populate the
   * $validation_failure_tasks array with failure information and the
   * $validation_information_tasks with informational messages.
   *
   * See the MaestroEngineTaskInterface.php interface declaration of this method for details.
   */
}