You are here

public static function MaestroEngine::setProductionTaskLabel in Maestro 8.2

Same name and namespace in other branches
  1. 3.x src/Engine/MaestroEngine.php \Drupal\maestro\Engine\MaestroEngine::setProductionTaskLabel()

SetProductionTaskLabel Lets you set the task label for an in-production task.

Parameters

int $queueID: The Maestro Queue ID.

string $taskLabel: The string you wish to set the task's label to.

File

src/Engine/MaestroEngine.php, line 436

Class

MaestroEngine
Class MaestroEngine.

Namespace

Drupal\maestro\Engine

Code

public static function setProductionTaskLabel($queueID, $taskLabel) {
  $queueRecord = \Drupal::entityTypeManager()
    ->getStorage('maestro_queue')
    ->load($queueID);
  $queueRecord
    ->set('task_label', $taskLabel);
  $queueRecord
    ->save();
}