PHP 클래스 Neos\Flow\Security\Policy\Role

파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$abstract boolean Whether or not the 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
$identifier string The identifier of this role
$name string The name of this role (without package key)
$packageKey string The package key this role belongs to (extracted from the identifier)
$parentRoles Role[]
$privileges Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface[]

공개 메소드들

메소드 설명
__construct ( string $identifier, array $parentRoles = [] )
__toString ( ) : string Returns the string representation of this role (the identifier)
addParentRole ( Role $parentRole ) : void Add a (direct) parent role to this role.
addPrivilege ( Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface $privilege ) : void Add a privilege to this role.
getAllParentRoles ( ) : Role[] Returns all (directly and indirectly reachable) parent roles for the given role.
getIdentifier ( ) : string Returns the fully qualified identifier of this role
getName ( ) : string The name of this role, being the identifier without the package key.
getPackageKey ( ) : string The key of the package that defines this role.
getParentRoles ( ) : Role[] Returns an array of all directly assigned parent roles.
getPrivilegeForTarget ( string $privilegeTargetIdentifier, array $privilegeParameters = [] ) : Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface
getPrivileges ( ) : Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface[]
getPrivilegesByType ( string $className ) : Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface[]
hasParentRole ( Role $role ) : boolean Returns TRUE if the given role is a directly assigned parent of this role.
isAbstract ( ) : boolean 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
setAbstract ( boolean $abstract ) : void
setParentRoles ( array $parentRoles ) : void Assign parent roles to this role.
setPrivileges ( array $privileges ) : void Assign privileges to this role.

메소드 상세

__construct() 공개 메소드

public __construct ( string $identifier, array $parentRoles = [] )
$identifier string The fully qualified identifier of this role (Vendor.Package:Role)
$parentRoles array

__toString() 공개 메소드

Returns the string representation of this role (the identifier)
public __toString ( ) : string
리턴 string the string representation of this role

addParentRole() 공개 메소드

Add a (direct) parent role to this role.
public addParentRole ( Role $parentRole ) : void
$parentRole Role
리턴 void

addPrivilege() 공개 메소드

Add a privilege to this role.
public addPrivilege ( Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface $privilege ) : void
$privilege Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface
리턴 void

getAllParentRoles() 공개 메소드

Returns all (directly and indirectly reachable) parent roles for the given role.
public getAllParentRoles ( ) : Role[]
리턴 Role[] Array of parent roles, indexed by role identifier

getIdentifier() 공개 메소드

Returns the fully qualified identifier of this role
public getIdentifier ( ) : string
리턴 string

getName() 공개 메소드

The name of this role, being the identifier without the package key.
public getName ( ) : string
리턴 string

getPackageKey() 공개 메소드

The key of the package that defines this role.
public getPackageKey ( ) : string
리턴 string

getParentRoles() 공개 메소드

Returns an array of all directly assigned parent roles.
public getParentRoles ( ) : Role[]
리턴 Role[] Array of direct parent roles, indexed by role identifier

getPrivilegeForTarget() 공개 메소드

public getPrivilegeForTarget ( string $privilegeTargetIdentifier, array $privilegeParameters = [] ) : Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface
$privilegeTargetIdentifier string
$privilegeParameters array
리턴 Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface the matching privilege or NULL if no privilege exists for the given constraints

getPrivileges() 공개 메소드

public getPrivileges ( ) : Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface[]
리턴 Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface[] Array of privileges assigned to this role

getPrivilegesByType() 공개 메소드

public getPrivilegesByType ( string $className ) : Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface[]
$className string Fully qualified name of the Privilege class to filter for
리턴 Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface[]

hasParentRole() 공개 메소드

Returns TRUE if the given role is a directly assigned parent of this role.
public hasParentRole ( Role $role ) : boolean
$role Role
리턴 boolean

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

setAbstract() 공개 메소드

public setAbstract ( boolean $abstract ) : void
$abstract boolean
리턴 void

setParentRoles() 공개 메소드

Assign parent roles to this role.
public setParentRoles ( array $parentRoles ) : void
$parentRoles array indexed by role identifier
리턴 void

setPrivileges() 공개 메소드

Assign privileges to this role.
public setPrivileges ( array $privileges ) : void
$privileges array
리턴 void

프로퍼티 상세

$abstract 보호되어 있는 프로퍼티

Whether or not the 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
protected bool $abstract
리턴 boolean

$identifier 보호되어 있는 프로퍼티

The identifier of this role
protected string $identifier
리턴 string

$name 보호되어 있는 프로퍼티

The name of this role (without package key)
protected string $name
리턴 string

$packageKey 보호되어 있는 프로퍼티

The package key this role belongs to (extracted from the identifier)
protected string $packageKey
리턴 string

$parentRoles 보호되어 있는 프로퍼티

protected Role[],Neos\Flow\Security\Policy $parentRoles
리턴 Role[]

$privileges 보호되어 있는 프로퍼티

protected PrivilegeInterface[],Neos\Flow\Security\Authorization\Privilege $privileges
리턴 Neos\Flow\Security\Authorization\Privilege\PrivilegeInterface[]