You are here

public function MigrateTemplateStorage::getTemplateByName in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate/src/MigrateTemplateStorage.php \Drupal\migrate\MigrateTemplateStorage::getTemplateByName()

Retrieve a template given a specific name.

Parameters

string $name: A migration template name.

Return value

NULL|array A parsed migration template, or NULL if it doesn't exist.

File

core/modules/migrate/src/MigrateTemplateStorage.php, line 74
Contains \Drupal\migrate\MigrateTemplateStorage.

Class

MigrateTemplateStorage
Storage to access migration template configuration in enabled extensions.

Namespace

Drupal\migrate

Code

public function getTemplateByName($name) {
  $templates = $this
    ->getAllTemplates();
  return isset($templates[$name]) ? $templates[$name] : NULL;
}