Get all 'Role' attribute values.

@return RoleAttributeValue[]
336450
public function roles(): array
    {
        return array_merge(array(),
            ...array_map(
                function (Attribute $attr) {
                    return $attr->values();
                }, $this->allOf(AttributeType::OID_ROLE)));
    }
317244
public function getValuesAttribute()
    {
        if ($this->attributes['data'] == '' || $this->attributes['type'] != 'list')
            return null;

        $data = unserialize($this->attributes['data']);

        if (!isset($data['values']))
            return null;
        else {
            return $data['values'];
        }
    }
401198
public function getAllowedRoles()
    {
        $returnValue = array();

        $role = new core_kernel_classes_Resource(GenerisRdf::INSTANCE_ROLE_GENERIS);
        $returnValue = array($role->getUri() => $role);

        return (array) $returnValue;
    }
1002719
public function getAttributes()
    {
        $attributes = array_merge(
            parent::getAttributes(),
            [
                'data-depth' => $this->Depth,
                'data-zoom' => $this->Zoom,
                'data-zoom-min' => $this->ZoomMin,
                'data-zoom-max' => $this->ZoomMax,
                'data-canvas' => $this->CanvasCSSID,
                'data-tag-list' => $this->TagListID,
                'data-color-text' => $this->ColorText,
                'data-color-outline' => $this->ColorOutline,
                'data-weight-size-min' => $this->WeightSizeMin,
                'data-weight-size-max' => $this->WeightSizeMax,
                'data-initial' => $this->Initial,
                'data-weight' => $this->dbObject('Weight')->NiceAsBoolean()
            ]
        );
        
        return $attributes;
    }
74698
public function roles() {
		$user = $this->user();
		if (!$user) {
			return [];
		}

		$roles = $this->_getUserRoles($user);

		return $roles;
	}
1147321
public function getRoles()
    {
        return \is_string($value = $this->getContentValue('roles', null))
            ? array_filter(explode(',', (string) $value))
            : null;
    }
1027408
public function getRoles()
    {
        $roleModel = new \erdiko\users\models\Role;
        $roleEntity = $roleModel->findById($this->_user->getRole());
		return array( $roleEntity->getName());
	}
544748
public function getFlagsAttribute() : array
    {
        if ($this->flagsArray !== null) {
            return $this->flagsArray;
        }

        return $this->flagsArray = json_decode($this->getAttributeFromArray('flags'), true);
    }
1347969
public function getRoles()
    {
        $data  = $this->getData();
        $roles = KObjectConfig::unbox($data->roles);

        if(empty($roles)) {
            $this->getSession()->set('user.roles', JAccess::getAuthorisedViewLevels($this->getId()));
        }

        return parent::getRoles();
    }
1153775
protected function _getRoleNames()
    {
        $names = [];
        if (!$this->has('roles')) {
            return $names;
        }
        foreach ($this->roles as $k => $role) {
            $names[] = $role->name;
        }

        return $names;
    }
1085249
public function getRawAttributes()
    {
        $data = array();
        foreach ($this->attributes as $name => $attribute) {
            $data[$name] = $attribute->getValues();
        }
        return $data;
    }
678950
public function getAttributes()
    {
        return [
            'name'        => $this->name,
            'shortcut'    => $this->shortcut,
            'mode'        => $this->mode,
            'description' => $this->description,
            'default'     => $this->default,
        ];
    }
630821
public function getAttributes()
    {
        $attributes = array_merge(
            parent::getAttributes(),
            $this->getDataAttributes()
        );
        
        if ($this->isMultiple()) {
            $attributes['multiple'] = true;
            $attributes['name'] = $this->getMultipleName();
        }
        
        if (!isset($attributes['data-placeholder'])) {
            $attributes['data-placeholder'] = $this->getEmptyString();
        }
        
        return $attributes;
    }
887636
public function getRolesAllowableValues()
    {
        return [
            self::ROLES_DIRECTOR,
            self::ROLES_PERSONNEL_MANAGER,
            self::ROLES_ACCOUNTANT,
            self::ROLES_SECURITY_OFFICER,
            self::ROLES_FACTORY_MANAGER,
            self::ROLES_STATION_MANAGER,
            self::ROLES_AUDITOR,
            self::ROLES_HANGAR_TAKE_1,
            self::ROLES_HANGAR_TAKE_2,
            self::ROLES_HANGAR_TAKE_3,
            self::ROLES_HANGAR_TAKE_4,
            self::ROLES_HANGAR_TAKE_5,
            self::ROLES_HANGAR_TAKE_6,
            self::ROLES_HANGAR_TAKE_7,
            self::ROLES_HANGAR_QUERY_1,
            self::ROLES_HANGAR_QUERY_2,
            self::ROLES_HANGAR_QUERY_3,
            self::ROLES_HANGAR_QUERY_4,
            self::ROLES_HANGAR_QUERY_5,
            self::ROLES_HANGAR_QUERY_6,
            self::ROLES_HANGAR_QUERY_7,
            self::ROLES_ACCOUNT_TAKE_1,
            self::ROLES_ACCOUNT_TAKE_2,
            self::ROLES_ACCOUNT_TAKE_3,
            self::ROLES_ACCOUNT_TAKE_4,
            self::ROLES_ACCOUNT_TAKE_5,
            self::ROLES_ACCOUNT_TAKE_6,
            self::ROLES_ACCOUNT_TAKE_7,
            self::ROLES_DIPLOMAT,
            self::ROLES_CONFIG_EQUIPMENT,
            self::ROLES_CONTAINER_TAKE_1,
            self::ROLES_CONTAINER_TAKE_2,
            self::ROLES_CONTAINER_TAKE_3,
            self::ROLES_CONTAINER_TAKE_4,
            self::ROLES_CONTAINER_TAKE_5,
            self::ROLES_CONTAINER_TAKE_6,
            self::ROLES_CONTAINER_TAKE_7,
            self::ROLES_RENT_OFFICE,
            self::ROLES_RENT_FACTORY_FACILITY,
            self::ROLES_RENT_RESEARCH_FACILITY,
            self::ROLES_JUNIOR_ACCOUNTANT,
            self::ROLES_CONFIG_STARBASE_EQUIPMENT,
            self::ROLES_TRADER,
            self::ROLES_COMMUNICATIONS_OFFICER,
            self::ROLES_CONTRACT_MANAGER,
            self::ROLES_STARBASE_DEFENSE_OPERATOR,
            self::ROLES_STARBASE_FUEL_TECHNICIAN,
            self::ROLES_FITTING_MANAGER,
            self::ROLES_TERRESTRIAL_COMBAT_OFFICER,
            self::ROLES_TERRESTRIAL_LOGISTICS_OFFICER,
        ];
    }
211403
public function getRoles()
    {
        $roles = array();

        if ($this->acl) {
            foreach ($this->acl->getRoles() as $role) {
                //Do not translate, only make first one uppercase
                $roles[$role] = ucfirst($role);
            }
        }
        asort($roles);

        return $roles;
    }
338233
public function rolesPermissions() {
    return [
      self::ROLE_USER => [
      ],
      self::ROLE_USER_MANAGER => [
        self::USER_VIEW,
        self::USER_CREATE,
        self::USER_UPDATE,
        self::USER_CHANGE_SECURITY_INFO,
        self::USER_CHANGE_PROFILE_INFO,
      ],
      self::ROLE_ADMIN => [
      ],
    ];
  }
1084309
public function getRoles() {

		$roles = [];

		foreach($this -> permissions as $role => $permissions) {
			$roles[$role] = $this -> getRole($role);
		}

		return $roles;
	}