Example #1
0
 /**
  * {@inheritdoc}
  */
 public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition)
 {
     return parent::create($container, $configuration, $plugin_id, $plugin_definition, $container->get('entity.manager'));
 }
Example #2
0
 /**
  * Constructs a \Drupal\user\Plugin\views\argument\RolesRid 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.
  */
 public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityManagerInterface $entity_manager)
 {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
     $this->roleStorage = $entity_manager->getStorage('user_role');
 }