You are here

public function MigrateTemplateStorage::getTemplateByName in Migrate Manifest 8.2

Same name and namespace in other branches
  1. 8 src/MigrateTemplateStorage.php \Drupal\migrate_manifest\MigrateTemplateStorage::getTemplateByName()
  2. 3.x src/MigrateTemplateStorage.php \Drupal\migrate_manifest\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.

Overrides MigrateTemplateStorageInterface::getTemplateByName

File

src/MigrateTemplateStorage.php, line 60

Class

MigrateTemplateStorage
Storage to access migration template configuration in enabled extensions.

Namespace

Drupal\migrate_manifest

Code

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