<?php
 namespace Modules\Admin\EntityMngWsAccounts; class AccountAccessConfig { public $accessLevel = [ 'customer' => [ 'select' => true, 'search' => true, 'insert' => true, 'update' => true, 'delete' => true, ], 'corporate' => [ 'select' => true, 'search' => true, 'insert' => true, 'update' => true, 'delete' => true, 'match' => true, 'updateProfile' => true, ], 'corporateOffice' => [ 'select' => true, 'insert' => true, 'update' => true, 'delete' => true, ], 'contactPerson' => [ 'select' => true, 'search' => true, ], 'city' => [ 'select' => true, 'insert' => true, 'search' => true, 'match'=> true, ], 'order' => [ 'select' => true, 'update' => true, ], 'service' => [ 'select' => true, 'process' => true, 'update' => true, 'cancel' => true, ], 'offer' => [ 'select' => true, 'update' => true, ], 'miceProject' => [ 'select' => true, 'match' => true, ], 'documentSeries' => [ 'select' => true, ], 'document' => [ 'select' => true, 'insert' => true, 'sendEmail' => true, ], 'supplier' => [ 'select' => true, 'search' => true, 'insert' => true, 'update' => true, 'delete' => true, 'match' => true, ], 'supplierProduct' => [ 'select' => true, 'insert' => true, 'update' => true, 'delete' => true, 'match' => true, ], 'supplierInvoice' => [ 'select' => true, 'insert' => true, 'update' => true, ], 'country' => [ 'select' => true, ], 'offerProfileRule' => [ 'select' => true, ], 'importedService' => [ 'select' => true, 'match' => true, ], 'importedOrder' => [ 'select' => true, 'match' => true, ], 'importedDocument' => [ 'process' => true, ], 'clientInvoice' => [ 'select' => true, 'insert' => true, 'groupRows' => true, ], 'cashingDocument' => [ 'select' => true, 'search' => true, 'insert' => true, 'update' => true, 'delete' => true, 'match' => true, ], 'balance' => [ 'select' => true, 'insert' => true, ], 'webhook' => [ 'insert' => true, ], 'general' => [ 'calculateOffer' => true, 'getCurrencyRates' => true, ], ]; public function getAccountAccess() { \Engine\Plugins\Manager::getInstance()->executeEvent('Modules\Admin\EntityMngWsAccounts\AccountAccessConfig-extendAccountAccess', [ 'accessLevel' => &$this->accessLevel, ]); return $this->accessLevel; } public function getAccountAvailableAccess() { $accessLevelConfigArr = $this->getAccountAccess(); foreach($accessLevelConfigArr as $entity => $operations) { $accessLevelConfigArr[$entity] = array_filter($operations); } $accessLevelConfigArr = array_filter($accessLevelConfigArr); return $accessLevelConfigArr; } } 