You are here

public static function MaestroEngine::setTemplateToUnvalidated in Maestro 8.2

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

Sets a template to unvalidated based on machine name.

Parameters

string $templateMachineName: The machine name of the template.

1 call to MaestroEngine::setTemplateToUnvalidated()
MaestroTemplateBuilderForm::removeTaskComplete in modules/maestro_template_builder/src/Form/MaestroTemplateBuilderForm.php
Ajax callback to remove a task from the template.

File

src/Engine/MaestroEngine.php, line 913

Class

MaestroEngine
Class MaestroEngine.

Namespace

Drupal\maestro\Engine

Code

public static function setTemplateToUnvalidated($templateMachineName) {
  $template = MaestroEngine::getTemplate($templateMachineName);
  if ($template !== NULL) {
    $template->validated = FALSE;
    $template
      ->save();
  }
}