ApprovableTrait
A trait which provides basic (repeated) functionality for approvable entities.
TODO: Make activities also use this trait.
Tags
Table of Contents
Properties
- $approvableText : ApprovableText|null
- When the entity has been approved/rejected a message can be attached. Since we do not always need this message it has been replaced with another entity which we can EXTRA_LAZY load to ensure it is not always included.
- $approved : ApprovableStatus
- State of the approval.
- $approvedAt : DateTime|null
- The date when the entity was approved.
- $approver : Member|null
- Who (dis)approved the entity using this trait?
Methods
- getApprovableText() : ApprovableText|null
- getApproved() : ApprovableStatus
- getApprovedAt() : DateTime|null
- getApprover() : Member|null
- isApproved() : bool
- setApprovableText() : void
- setApproved() : void
- setApprovedAt() : void
- setApprover() : void
- toGdprArray() : ApprovableTraitGdprArrayType
Properties
$approvableText
When the entity has been approved/rejected a message can be attached. Since we do not always need this message it has been replaced with another entity which we can EXTRA_LAZY load to ensure it is not always included.
protected
ApprovableText|null
$approvableText
= null
Attributes
- #[JoinColumn]
- $name: 'approvableText_id'
- $referencedColumnName: 'id'
- $nullable: true
- #[OneToOne]
- $targetEntity: \Application\Model\ApprovableText::class
- $cascade: ['persist', 'remove']
- $fetch: 'EXTRA_LAZY'
- $orphanRemoval: true
$approved
State of the approval.
protected
ApprovableStatus
$approved
Attributes
- #[Column]
- $type: 'integer'
- $enumType: \Application\Model\Enums\ApprovableStatus::class
$approvedAt
The date when the entity was approved.
protected
DateTime|null
$approvedAt
= null
Attributes
- #[Column]
- $type: 'datetime'
- $nullable: true
$approver
Who (dis)approved the entity using this trait?
protected
Member|null
$approver
= null
Attributes
- #[JoinColumn]
- $referencedColumnName: 'lidnr'
- #[ManyToOne]
- $targetEntity: \Decision\Model\Member::class
Methods
getApprovableText()
public
getApprovableText() : ApprovableText|null
Return values
ApprovableText|nullgetApproved()
public
getApproved() : ApprovableStatus
Return values
ApprovableStatusgetApprovedAt()
public
getApprovedAt() : DateTime|null
Return values
DateTime|nullgetApprover()
public
getApprover() : Member|null
Return values
Member|nullisApproved()
public
isApproved() : bool
Return values
boolsetApprovableText()
public
setApprovableText(ApprovableText|null $approvableText) : void
Parameters
- $approvableText : ApprovableText|null
setApproved()
public
setApproved(ApprovableStatus $approved) : void
Parameters
- $approved : ApprovableStatus
setApprovedAt()
public
setApprovedAt(DateTime|null $approvedAt) : void
Parameters
- $approvedAt : DateTime|null
setApprover()
public
setApprover(Member|null $approver) : void
Parameters
- $approver : Member|null
toGdprArray()
public
toGdprArray() : ApprovableTraitGdprArrayType