PersonalDataSelection
in package
Class representing the personal data selection value object
Table of Contents
- $selection : array<string|int, mixed>
- Selection values
- $validKeys : array<string|int, mixed>
- Valid selection keys
- __construct() : mixed
- Create an instance
- isSelected() : bool
- Return whether the provided item is selected
Properties
$selection
Selection values
private
array<string|int, mixed>
$selection
= []
$validKeys
Valid selection keys
private
array<string|int, mixed>
$validKeys
= [PersonalDataSelectionItem::BASE_DATA, PersonalDataSelectionItem::ORDERS, PersonalDataSelectionItem::WITHDRAWALS, PersonalDataSelectionItem::AGREEMENTS, PersonalDataSelectionItem::EMAILS, PersonalDataSelectionItem::CARTS, PersonalDataSelectionItem::REVIEWS, PersonalDataSelectionItem::NEWSLETTER_SUBSCRIPTIONS]
Methods
__construct()
Create an instance
public
__construct(array<string|int, mixed> $selection) : mixed
Parameters
- $selection : array<string|int, mixed>
-
Selection key-value pairs
Return values
mixed —isSelected()
Return whether the provided item is selected
public
isSelected(string $item) : bool
Parameters
- $item : string
-
Selection item
Return values
bool —Selection value