public function FieldHandlerBase::__construct in CMS Content Sync 2.1.x
Same name and namespace in other branches
- 8 src/Plugin/FieldHandlerBase.php \Drupal\cms_content_sync\Plugin\FieldHandlerBase::__construct()
- 2.0.x src/Plugin/FieldHandlerBase.php \Drupal\cms_content_sync\Plugin\FieldHandlerBase::__construct()
Constructs a Drupal\rest\Plugin\ResourceBase object.
Parameters
array $configuration: A configuration array containing information about the plugin instance. Must contain entity_type_name, bundle_name, field_name, field_definition, settings and sync (see above).
string $plugin_id: The plugin_id for the plugin instance
mixed $plugin_definition: The plugin implementation definition
\Psr\Log\LoggerInterface $logger: A logger instance
Overrides PluginBase::__construct
File
- src/
Plugin/ FieldHandlerBase.php, line 79
Class
- FieldHandlerBase
- Common base class for field handler plugins.
Namespace
Drupal\cms_content_sync\PluginCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, LoggerInterface $logger) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->logger = $logger;
$this->entityTypeName = $configuration['entity_type_name'];
$this->bundleName = $configuration['bundle_name'];
$this->fieldName = $configuration['field_name'];
$this->fieldDefinition = $configuration['field_definition'];
$this->settings = $configuration['settings'];
$this->flow = $configuration['sync'];
}