-class DefaultSelection extends PluginBase implements SelectionInterface, SelectionWithAutocreateInterface, ContainerFactoryPluginInterface {
-
- /**
- * The entity manager.
- *
- * @var \Drupal\Core\Entity\EntityManagerInterface
- */
- protected $entityManager;
-
- /**
- * The module handler service.
- *
- * @var \Drupal\Core\Extension\ModuleHandlerInterface
- */
- protected $moduleHandler;
-
- /**
- * The current user.
- *
- * @var \Drupal\Core\Session\AccountInterface
- */
- protected $currentUser;
-
- /**
- * Constructs a new SelectionBase object.
- *
- * @param array $configuration
- * A configuration array containing information about the plugin instance.
- * @param string $plugin_id
- * The plugin_id for the plugin instance.
- * @param mixed $plugin_definition
- * The plugin implementation definition.
- * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
- * The entity manager service.
- * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
- * The module handler service.
- * @param \Drupal\Core\Session\AccountInterface $current_user
- * The current user.
- */
- public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager, ModuleHandlerInterface $module_handler, AccountInterface $current_user) {
- parent::__construct($configuration, $plugin_id, $plugin_definition);
-
- $this->entityManager = $entity_manager;
- $this->moduleHandler = $module_handler;
- $this->currentUser = $current_user;
+class DefaultSelection extends SelectionPluginBase implements ContainerFactoryPluginInterface, SelectionWithAutocreateInterface {
+
+ use SelectionTrait {
+ // PHP 5.5.9 gets confused between SelectionPluginBase::__construct() and
+ // SelectionTrait::__construct() that's why we are renaming the
+ // SelectionTrait::__construct() to avoid the confusion.
+ // @todo Remove this in https://www.drupal.org/node/2670966.
+ SelectionTrait::__construct as private initialize;