You are here

protected function CckBuilder::getCckPlugin in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate_drupal/src/Plugin/migrate/builder/CckBuilder.php \Drupal\migrate_drupal\Plugin\migrate\builder\CckBuilder::getCckPlugin()

Gets a cckfield plugin instance.

Parameters

string $field_type: The field type (plugin ID).

\Drupal\migrate\Entity\MigrationInterface|NULL $migration: The migration, if any.

Return value

\Drupal\migrate_drupal\Plugin\MigrateCckFieldInterface The cckfield plugin instance.

File

core/modules/migrate_drupal/src/Plugin/migrate/builder/CckBuilder.php, line 75
Contains \Drupal\migrate_drupal\Plugin\migrate\builder\CckBuilder.

Class

CckBuilder
Base class for builders which leverage cckfield plugins.

Namespace

Drupal\migrate_drupal\Plugin\migrate\builder

Code

protected function getCckPlugin($field_type, MigrationInterface $migration = NULL) {
  if (empty($this->cckPluginCache[$field_type])) {
    $this->cckPluginCache[$field_type] = $this->cckPluginManager
      ->createInstance($field_type, [], $migration);
  }
  return $this->cckPluginCache[$field_type];
}