isAbstract() публичный Метод

Whether or not this role is "abstract", meaning it can't be assigned to accounts directly but only serves as a "template role" for other roles to inherit from
public isAbstract ( ) : boolean
Результат boolean
Пример #1
0
 /**
  * Adds a role to this account
  *
  * @param Role $role
  * @return void
  * @throws \InvalidArgumentException
  * @api
  */
 public function addRole(Role $role)
 {
     if ($role->isAbstract()) {
         throw new \InvalidArgumentException(sprintf('Abstract roles can\'t be assigned to accounts directly, but the role "%s" is marked abstract', $role->getIdentifier()), 1399900657);
     }
     $this->initializeRoles();
     if (!$this->hasRole($role)) {
         $roleIdentifier = $role->getIdentifier();
         $this->roleIdentifiers[] = $roleIdentifier;
         $this->roles[$roleIdentifier] = $role;
     }
 }