abstract class CckBuilder in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/migrate_drupal/src/Plugin/migrate/builder/CckBuilder.php \Drupal\migrate_drupal\Plugin\migrate\builder\CckBuilder
Base class for builders which leverage cckfield plugins.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTrait
- class \Drupal\migrate\Plugin\migrate\builder\BuilderBase implements MigrateBuilderInterface
- class \Drupal\migrate_drupal\Plugin\migrate\builder\CckBuilder implements ContainerFactoryPluginInterface
- class \Drupal\migrate\Plugin\migrate\builder\BuilderBase implements MigrateBuilderInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, StringTranslationTrait
Expanded class hierarchy of CckBuilder
3 files declare their use of CckBuilder
- CckMigration.php in core/
modules/ migrate_drupal/ src/ Plugin/ migrate/ builder/ d6/ CckMigration.php - Contains \Drupal\migrate_drupal\Plugin\migrate\builder\d6\CckMigration.
- Node.php in core/
modules/ node/ src/ Plugin/ migrate/ builder/ d6/ Node.php - Contains \Drupal\node\Plugin\migrate\builder\d6\Node.
- Node.php in core/
modules/ node/ src/ Plugin/ migrate/ builder/ d7/ Node.php - Contains \Drupal\node\Plugin\migrate\builder\d7\Node.
File
- core/
modules/ migrate_drupal/ src/ Plugin/ migrate/ builder/ CckBuilder.php, line 19 - Contains \Drupal\migrate_drupal\Plugin\migrate\builder\CckBuilder.
Namespace
Drupal\migrate_drupal\Plugin\migrate\builderView source
abstract class CckBuilder extends BuilderBase implements ContainerFactoryPluginInterface {
/**
* The cckfield plugin manager.
*
* @var \Drupal\migrate\Plugin\MigratePluginManager
*/
protected $cckPluginManager;
/**
* Already-instantiated cckfield plugins, keyed by ID.
*
* @var \Drupal\migrate_drupal\Plugin\MigrateCckFieldInterface[]
*/
protected $cckPluginCache = [];
/**
* Constructs a CckBuilder.
*
* @param array $configuration
* Plugin configuration.
* @param string $plugin_id
* The plugin ID.
* @param mixed $plugin_definition
* The plugin definition.
* @param \Drupal\migrate\Plugin\MigratePluginManager $cck_manager
* The cckfield plugin manager.
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, MigratePluginManager $cck_manager) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->cckPluginManager = $cck_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('plugin.manager.migrate.cckfield'));
}
/**
* Gets a cckfield plugin instance.
*
* @param string $field_type
* The field type (plugin ID).
* @param \Drupal\migrate\Entity\MigrationInterface|NULL $migration
* The migration, if any.
*
* @return \Drupal\migrate_drupal\Plugin\MigrateCckFieldInterface
* The cckfield plugin instance.
*/
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];
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BuilderBase:: |
protected | function | Returns a fully initialized instance of a source plugin. | |
CckBuilder:: |
protected | property | Already-instantiated cckfield plugins, keyed by ID. | |
CckBuilder:: |
protected | property | The cckfield plugin manager. | |
CckBuilder:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
|
CckBuilder:: |
protected | function | Gets a cckfield plugin instance. | |
CckBuilder:: |
public | function |
Constructs a CckBuilder. Overrides PluginBase:: |
|
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
MigrateBuilderInterface:: |
public | function | Builds migration entities based on a template. | 6 |
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 2 |
PluginBase:: |
protected | property | The plugin implementation definition. | |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
StringTranslationTrait:: |
protected | property | The string translation service. | |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. |