WidgetVoter
final class \
- Extends
- PrincipalVoter
Decides on using a dashboard widget: isGranted(Scope::ACCESS, $widgetRegistry->getAllWidgets()['sysLogErrors']).
A widget marked "adminOnly" is granted to admins only, every other widget by a grant of the policy decision point. Widgets are granted to backend users only.
Internal
not part of TYPO3 Core API yet, still experimental as part of the authentication modernization groundwork
Tags
Attributes
Table of Contents
Methods
- __construct() : mixed
- supportsAttribute() : bool
- supportsType() : bool
- hasRole() : bool
- supports() : bool
- voteOnAttribute() : bool
- voteOnPrincipal() : bool
Methods
__construct()
public
__construct(PolicyDecisionPointInterface $policyDecisionPoint) : mixed
Parameters
- $policyDecisionPoint : PolicyDecisionPointInterface
supportsAttribute()
public
supportsAttribute(string $attribute) : bool
Parameters
- $attribute : string
Return values
boolsupportsType()
public
supportsType(string $subjectType) : bool
Parameters
- $subjectType : string
Return values
boolhasRole()
protected
final hasRole(Principal $principal, SecurityRole $role) : bool
Parameters
- $principal : Principal
- $role : SecurityRole
Return values
boolsupports()
protected
supports(string $attribute, mixed $subject) : bool
Parameters
- $attribute : string
- $subject : mixed
Return values
boolvoteOnAttribute()
protected
final voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token[, Vote|null $vote = null ]) : bool
Parameters
- $attribute : string
- $subject : mixed
- $token : TokenInterface
- $vote : Vote|null = null
Return values
boolvoteOnPrincipal()
protected
voteOnPrincipal(string $attribute, mixed $subject, Principal $principal[, Vote|null $vote = null ]) : bool
Parameters
- $attribute : string
- $subject : mixed
- $principal : Principal
- $vote : Vote|null = null
-
Collects the reasons of the decision, see Vote::addReason()