class DefaultTypeProcessor in Content Synchronizer 3.x
Class DefaultTypeProcessor.
@package Drupal\content_synchronizer\Processors\Type
Hierarchy
- class \Drupal\content_synchronizer\Processors\Type\DefaultTypeProcessor implements TypeProcessorInterface
Expanded class hierarchy of DefaultTypeProcessor
File
- src/
Processors/ Type/ DefaultTypeProcessor.php, line 13
Namespace
Drupal\content_synchronizer\Processors\TypeView source
class DefaultTypeProcessor implements TypeProcessorInterface {
/**
* {@inheritdoc}
*/
public function getPluginId() {
return 'type_processor_default';
}
/**
* {@inheritdoc}
*/
public function getPluginDefinition() {
return [];
}
/**
* {@inheritdoc}
*/
public function getExportedData(TypedData $propertyData) {
$data = [];
foreach ($propertyData as $value) {
$data[] = $value
->getValue();
}
return $data;
}
/**
* {@inheritdoc}
*/
public function initImportedEntity(EntityInterface $entityToImport, $propertyId, array $data) {
$entityToImport
->set($propertyId, $data[$propertyId]);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DefaultTypeProcessor:: |
public | function |
Get the data to export. Overrides TypeProcessorInterface:: |
|
DefaultTypeProcessor:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
|
DefaultTypeProcessor:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
DefaultTypeProcessor:: |
public | function |
Init the $propertyId value in the entity to import. Overrides TypeProcessorInterface:: |