public function FieldUiLocalTask::__construct in Drupal 8
Same name and namespace in other branches
- 9 core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php \Drupal\field_ui\Plugin\Derivative\FieldUiLocalTask::__construct()
- 10 core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php \Drupal\field_ui\Plugin\Derivative\FieldUiLocalTask::__construct()
Creates an FieldUiLocalTask object.
Parameters
\Drupal\Core\Routing\RouteProviderInterface $route_provider: The route provider.
\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.
\Drupal\Core\StringTranslation\TranslationInterface $string_translation: The translation manager.
\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository.
File
- core/
modules/ field_ui/ src/ Plugin/ Derivative/ FieldUiLocalTask.php, line 60
Class
- FieldUiLocalTask
- Provides local task definitions for all entity bundles.
Namespace
Drupal\field_ui\Plugin\DerivativeCode
public function __construct(RouteProviderInterface $route_provider, EntityTypeManagerInterface $entity_type_manager, TranslationInterface $string_translation, EntityDisplayRepositoryInterface $entity_display_repository = NULL) {
$this->routeProvider = $route_provider;
$this->entityTypeManager = $entity_type_manager;
$this->stringTranslation = $string_translation;
if (!$entity_display_repository) {
@trigger_error('Calling FieldUiLocalTask::__construct() with the $entity_repository argument is supported in drupal:8.7.0 and will be required before drupal:9.0.0. See https://www.drupal.org/node/2549139.', E_USER_DEPRECATED);
$entity_display_repository = \Drupal::service('entity_display.repository');
}
$this->entityDisplayRepository = $entity_display_repository;
}