public function getNamedTemplate($name)
    {
        if ($importedTemplate = singleton(WorkflowDefinitionImporter::class)->getImportedWorkflows($name)) {
            return $importedTemplate;
        }

        if (!is_array($this->templates)) {
            return;
        }
        foreach ($this->templates as $template) {
            if ($template->getName() == $name) {
                return $template;
            }
        }
    }
public function getNamedTemplate($name)
    {
        if ($importedTemplate = singleton(WorkflowDefinitionImporter::class)->getImportedWorkflows($name)) {
            return $importedTemplate;
        }

        if (!is_array($this->templates)) {
            return;
        }
        foreach ($this->templates as $template) {
            if ($template->getName() == $name) {
                return $template;
            }
        }
    }
public function getNamedTemplate ( $ name ) { if ( $ importedTemplate = singleton ( WorkflowDefinitionImporter :: class ) -> getImportedWorkflows ( $ name ) ) { return $ importedTemplate ; } if ( ! is_array ( $ this -> templates ) ) { return ; } foreach ( $ this -> templates as $ template ) { if ( $ template -> getName ( ) == $ name ) { return $ template ; } } }
Get a template by name

@param string $name
@return WorkflowTemplate|null
Get a template by name