summaryrefslogtreecommitdiffstats
path: root/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/Role.php
blob: de17dc938a32cf1a77e77213c7189fd91a4abe42 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<?php

/**
 * @file
 * Contains Drupal\user\Plugin\Core\Entity\Role.
 */

namespace Drupal\user\Plugin\Core\Entity;

use Drupal\Core\Annotation\Plugin;
use Drupal\Core\Annotation\Translation;
use Drupal\Core\Config\Entity\ConfigEntityBase;

/**
 * Defines the user role entity class.
 *
 * @Plugin(
 *   id = "user_role",
 *   label = @Translation("Role"),
 *   module = "user",
 *   controller_class = "Drupal\user\RoleStorageController",
 *   config_prefix = "user.role",
 *   entity_keys = {
 *     "id" = "id",
 *     "uuid" = "uuid",
 *     "label" = "label"
 *   }
 * )
 */
class Role extends ConfigEntityBase {

  /**
   * The machine name of this role.
   *
   * @var string
   */
  public $id;

  /**
   * The UUID of this role.
   *
   * @var string
   */
  public $uuid;

  /**
   * The human-readable label of this role.
   *
   * @var string
   */
  public $label;

  /**
   * The weight of this role in administrative listings.
   *
   * @var int
   */
  public $weight;

}