Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ItemsUpdater.php
Go to the documentation of this file.
1 <?php
7 
8 class ItemsUpdater implements \Magento\Framework\View\Layout\Argument\UpdaterInterface
9 {
13  protected $authorization;
14 
18  public function __construct(\Magento\Framework\AuthorizationInterface $authorization)
19  {
20  $this->authorization = $authorization;
21  }
22 
28  public function update($argument)
29  {
30  if (false === $this->authorization->isAllowed('Magento_Indexer::changeMode')) {
31  unset($argument['change_mode_onthefly']);
32  unset($argument['change_mode_changelog']);
33  }
34  return $argument;
35  }
36 }
__construct(\Magento\Framework\AuthorizationInterface $authorization)