Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Plugin.php
Go to the documentation of this file.
1 <?php
8 
12 class Plugin
13 {
17  private $authorization;
18 
22  private $isAllowed;
23 
28  public function __construct(
29  \Magento\Framework\AuthorizationInterface $authorization
30  ) {
31  $this->authorization = $authorization;
32  }
33 
42  public function afterGetMeta(
43  \Magento\AdminNotification\Ui\Component\DataProvider\DataProvider $dataProvider,
44  $result
45  ) {
46  if (!isset($this->isAllowed)) {
47  $this->isAllowed = $this->authorization->isAllowed(
48  'Magento_Logging::system_magento_logging_bulk_operations'
49  );
50  }
51  $result['columns']['arguments']['data']['config']['isAllowed'] = $this->isAllowed;
52  return $result;
53  }
54 }
__construct(\Magento\Framework\AuthorizationInterface $authorization)
Definition: Plugin.php:28
afterGetMeta(\Magento\AdminNotification\Ui\Component\DataProvider\DataProvider $dataProvider, $result)
Definition: Plugin.php:42