Issue #1479454 by Hugo Wetterberg, galooph, dawehner, andypost, marcingy, heyrocker...
[project/drupal.git] / core / modules / user / lib / Drupal / user / Plugin / views / argument / RolesRid.php
1 <?php
2
3 /**
4 * @file
5 * Definition of views_handler_argument_users_roles_rid.
6 */
7
8 namespace Drupal\user\Plugin\views\argument;
9
10 use Drupal\Core\Annotation\Plugin;
11 use Drupal\views\Plugin\views\argument\ManyToOne;
12
13 /**
14 * Allow role ID(s) as argument.
15 *
16 * @ingroup views_argument_handlers
17 *
18 * @Plugin(
19 * id = "users_roles_rid",
20 * module = "user"
21 * )
22 */
23 class RolesRid extends ManyToOne {
24
25 function title_query() {
26 return array(entity_load('user_role', $this->value)->label());
27 }
28
29 }