public function EntityUsageTrackBase::__construct in Entity Usage 8.3
Same name and namespace in other branches
- 8 src/EntityUsageTrackBase.php \Drupal\entity_usage\EntityUsageTrackBase::__construct()
- 8.2 src/EntityUsageTrackBase.php \Drupal\entity_usage\EntityUsageTrackBase::__construct()
Plugin constructor.
Parameters
array $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin_id for the plugin instance.
mixed $plugin_definition: The plugin implementation definition.
\Drupal\entity_usage\EntityUsage $usage_service: The usage tracking service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The EntityTypeManager service.
\Drupal\Core\Entity\EntityFieldManagerInterface $entity_field_manager: The EntityFieldManager service.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The factory for configuration objects.
\Drupal\Core\Entity\EntityRepositoryInterface $entity_repository: The EntityRepositoryInterface service.
Overrides PluginBase::__construct
1 call to EntityUsageTrackBase::__construct()
- HtmlLink::__construct in src/
Plugin/ EntityUsage/ Track/ HtmlLink.php - Constructs the HtmlLink plugin.
1 method overrides EntityUsageTrackBase::__construct()
- HtmlLink::__construct in src/
Plugin/ EntityUsage/ Track/ HtmlLink.php - Constructs the HtmlLink plugin.
File
- src/
EntityUsageTrackBase.php, line 76
Class
- EntityUsageTrackBase
- Base implementation for track plugins.
Namespace
Drupal\entity_usageCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityUsage $usage_service, EntityTypeManagerInterface $entity_type_manager, EntityFieldManagerInterface $entity_field_manager, ConfigFactoryInterface $config_factory, EntityRepositoryInterface $entity_repository) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->configuration += $this
->defaultConfiguration();
$this->usageService = $usage_service;
$this->entityTypeManager = $entity_type_manager;
$this->entityFieldManager = $entity_field_manager;
$this->config = $config_factory
->get('entity_usage.settings');
$this->entityRepository = $entity_repository;
}