class Node in Zircon Profile 8
Same name in this branch
- 8 core/modules/node/src/Entity/Node.php \Drupal\node\Entity\Node
- 8 core/modules/node/src/Plugin/views/argument_default/Node.php \Drupal\node\Plugin\views\argument_default\Node
- 8 core/modules/node/src/Plugin/views/wizard/Node.php \Drupal\node\Plugin\views\wizard\Node
- 8 core/modules/node/src/Plugin/views/field/Node.php \Drupal\node\Plugin\views\field\Node
- 8 core/modules/node/src/Plugin/migrate/source/d6/Node.php \Drupal\node\Plugin\migrate\source\d6\Node
- 8 core/modules/node/src/Plugin/migrate/source/d7/Node.php \Drupal\node\Plugin\migrate\source\d7\Node
- 8 core/modules/node/src/Plugin/migrate/builder/d6/Node.php \Drupal\node\Plugin\migrate\builder\d6\Node
- 8 core/modules/node/src/Plugin/migrate/builder/d7/Node.php \Drupal\node\Plugin\migrate\builder\d7\Node
Same name and namespace in other branches
- 8.0 core/modules/node/src/Plugin/migrate/builder/d6/Node.php \Drupal\node\Plugin\migrate\builder\d6\Node
Plugin annotation
@PluginID("d6_node");
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\node\Plugin\migrate\builder\d6\Node
- 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 Node
12 string references to 'Node'
- CategorizingPluginManagerTraitTest::setUp in core/
tests/ Drupal/ Tests/ Core/ Plugin/ CategorizingPluginManagerTraitTest.php - CategorizingPluginManagerTraitTest::testProcessDefinitionCategory in core/
tests/ Drupal/ Tests/ Core/ Plugin/ CategorizingPluginManagerTraitTest.php - @covers ::processDefinitionCategory
- CategoryAutocompleteTest::providerTestAutocompleteSuggestions in core/
modules/ block/ tests/ src/ Unit/ CategoryAutocompleteTest.php - Data provider for testAutocompleteSuggestions().
- CategoryAutocompleteTest::setUp in core/
modules/ block/ tests/ src/ Unit/ CategoryAutocompleteTest.php - CommentManagerTest::testGetFields in core/
modules/ comment/ tests/ src/ Unit/ CommentManagerTest.php - Tests the getFields method.
File
- core/
modules/ node/ src/ Plugin/ migrate/ builder/ d6/ Node.php, line 17 - Contains \Drupal\node\Plugin\migrate\builder\d6\Node.
Namespace
Drupal\node\Plugin\migrate\builder\d6View source
class Node extends CckBuilder {
/**
* {@inheritdoc}
*/
public function buildMigrations(array $template) {
$migrations = [];
// Read all CCK field instance definitions in the source database.
$fields = array();
$source_plugin = $this
->getSourcePlugin('d6_field_instance', $template['source']);
try {
$source_plugin
->checkRequirements();
foreach ($source_plugin as $field) {
$info = $field
->getSource();
$fields[$info['type_name']][$info['field_name']] = $info;
}
} catch (RequirementsException $e) {
// Don't do anything; $fields will be empty.
}
foreach ($this
->getSourcePlugin('d6_node_type', $template['source']) as $row) {
$node_type = $row
->getSourceProperty('type');
$values = $template;
$values['id'] = $template['id'] . '__' . $node_type;
$label = $template['label'];
$values['label'] = $this
->t("@label (@type)", [
'@label' => $label,
'@type' => $node_type,
]);
$values['source']['node_type'] = $node_type;
// If this migration is based on the d6_node_revision template, it should
// explicitly depend on the corresponding d6_node variant.
if ($template['id'] == 'd6_node_revision') {
$values['migration_dependencies']['required'][] = 'd6_node__' . $node_type;
}
$migration = Migration::create($values);
if (isset($fields[$node_type])) {
foreach ($fields[$node_type] as $field => $info) {
if ($this->cckPluginManager
->hasDefinition($info['type'])) {
$this
->getCckPlugin($info['type'])
->processCckFieldValues($migration, $field, $info);
}
else {
$migration
->setProcessOfProperty($field, $field);
}
}
}
$migrations[] = $migration;
}
return $migrations;
}
}
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 | |
Node:: |
public | function |
Builds migration entities based on a template. Overrides MigrateBuilderInterface:: |
|
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. |