custom/plugins/CioBudget/src/Subscriber/BudgetShiftPermissionSubscriber.php line 18

Open in your IDE?
  1. <?php
  2. namespace CioBudget\Subscriber;
  3. use CioCustomerPermissionGroups\Event\CustomerAclRolesEvent;
  4. use Symfony\Component\EventDispatcher\EventSubscriberInterface;
  5. class BudgetShiftPermissionSubscriber implements EventSubscriberInterface
  6. {
  7.     public static function getSubscribedEvents(): array
  8.     {
  9.         return [
  10.             CustomerAclRolesEvent::class => 'onCustomerAclRolesEvent',
  11.         ];
  12.     }
  13.     public function onCustomerAclRolesEvent(CustomerAclRolesEvent $event)
  14.     {
  15.         $event->addRoles([
  16.             [
  17.                 'title' => 'ALLOW_BUDGET_SHIFTS',
  18.                 'description' => 'Das Übertragen von Guthaben aus eigenen Budget an beliebige andere Budgets erlauben.'
  19.             ],
  20.             [
  21.                 'title' => 'ALLOW_ADDING_USERS_TO_BUDGET',
  22.                 'description' => 'Vertretern das Hinzufügen von Benutzern zum Budget erlauben.'
  23.             ],
  24.             [
  25.                 'title' => 'ALLOW_ACCESS_TO_BUDGET_HISTORY',
  26.                 'description' => 'Einsicht in Budget-Historie im Frontend.'
  27.             ],
  28.             [
  29.                 'title' => 'ALLOW_SHOW_TOTAL_POINTS',
  30.                 'description' => 'Einsicht der Gesamtpunkte im Frontend.'
  31.             ]
  32.         ]);
  33.     }
  34. }