class DrushRole8


Expanded class hierarchy of DrushRole8


Contains filters are case sensitive
Namesort descending Modifiers Type Description
DrushRole7::delete public function Overrides DrushRole::delete
DrushRole7::getModulePerms public function Overrides DrushRole::getModulePerms
DrushRole7::getPerms public function Overrides DrushRole::getPerms
DrushRole7::grant_permissions public function Overrides DrushRole::grant_permissions
DrushRole7::revoke_permissions public function Overrides DrushRole::revoke_permissions
DrushRole8::role_create public function Overrides DrushRole7::role_create
DrushRole::$name public property Drupal 6 and Drupal 7: 'rid' is numeric 'name' is machine name (e.g. 'anonymous user')
DrushRole::$rid public property
DrushRole::$roles public property This is initialized to the result of the user_roles() function, which returns an associative array of rid => name pairs.
DrushRole::add public function
DrushRole::getAllModulePerms public function
DrushRole::remove public function
DrushRole::__construct public function This constructor will allow the role to be selected either via the role id or via the role name.


classes/DrushRole.php, line 195

View source
class DrushRole8 extends DrushRole7 {
  public function role_create($role_machine_name, $role_human_readable_name = '') {
    // In D6 and D7, when we create a new role, the role
    // machine name is specified, and the numeric rid is
    // auto-assigned (next available id); in D8, when we
    // create a new role, we need to specify both the rid,
    // which is now the role machine name, and also a human-readable
    // role name.  If the client did not provide a human-readable
    // name, then we'll use the role machine name in its place.
    if (empty($role_human_readable_name)) {
      $role_human_readable_name = ucfirst($role_machine_name);
    return user_role_save((object) array('name' => $role_human_readable_name, 'rid' => $role_machine_name));