GroupPermissionListener
in package
Class GroupPermissionListener
Tags
Table of Contents
- $configurationService : ConfigurationService
- $connection : Connection
- __construct() : mixed
- ProductsGroupCheckListener constructor.
- __invoke() : GroupCheckUpdated
- customerStatusIds() : array<string|int, mixed>
- Returns all available customer status ids.
- notChanged() : bool
- Checks if the value changed.
- update() : void
- Updates the products, categories and content manager tables with new group permission data.
- updateContentManager() : void
- Updates the content manager table group permission data.
- updatePermissions() : void
- Updates group permission column for given table.
Properties
$configurationService
private
ConfigurationService
$configurationService
$connection
private
Connection
$connection
Methods
__construct()
ProductsGroupCheckListener constructor.
public
__construct(ConfigurationService $configurationService, Connection $connection) : mixed
Parameters
- $configurationService : ConfigurationService
- $connection : Connection
Return values
mixed —__invoke()
public
__invoke(GroupCheckUpdated $event) : GroupCheckUpdated
Parameters
- $event : GroupCheckUpdated
Return values
GroupCheckUpdated —customerStatusIds()
Returns all available customer status ids.
private
customerStatusIds() : array<string|int, mixed>
Return values
array<string|int, mixed> —notChanged()
Checks if the value changed.
private
notChanged(GroupCheckUpdated $event) : bool
If the value is not changed, we dont want to update the permissions.
Parameters
- $event : GroupCheckUpdated
Return values
bool —update()
Updates the products, categories and content manager tables with new group permission data.
private
update(bool $mode, array<string|int, mixed> $customerStatusIds) : void
Parameters
- $mode : bool
- $customerStatusIds : array<string|int, mixed>
Return values
void —updateContentManager()
Updates the content manager table group permission data.
private
updateContentManager(bool $mode, array<string|int, mixed> $customerStatusIds) : void
Parameters
- $mode : bool
- $customerStatusIds : array<string|int, mixed>
Return values
void —updatePermissions()
Updates group permission column for given table.
private
updatePermissions(string $table, string $customerStatusId, string $status) : void
Parameters
- $table : string
- $customerStatusId : string
- $status : string