Interceptor.php 1.27 KB
Newer Older
Ketan's avatar
Ketan committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
<?php
namespace Magento\Backend\Model\Menu\Builder;

/**
 * Interceptor class for @see \Magento\Backend\Model\Menu\Builder
 */
class Interceptor extends \Magento\Backend\Model\Menu\Builder implements \Magento\Framework\Interception\InterceptorInterface
{
    use \Magento\Framework\Interception\Interceptor;

    public function __construct(\Magento\Backend\Model\Menu\Item\Factory $menuItemFactory)
    {
        $this->___init();
        parent::__construct($menuItemFactory);
    }

    /**
     * {@inheritdoc}
     */
    public function processCommand(\Magento\Backend\Model\Menu\Builder\AbstractCommand $command)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'processCommand');
        if (!$pluginInfo) {
            return parent::processCommand($command);
        } else {
            return $this->___callPlugins('processCommand', func_get_args(), $pluginInfo);
        }
    }

    /**
     * {@inheritdoc}
     */
    public function getResult(\Magento\Backend\Model\Menu $menu)
    {
        $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getResult');
        if (!$pluginInfo) {
            return parent::getResult($menu);
        } else {
            return $this->___callPlugins('getResult', func_get_args(), $pluginInfo);
        }
    }
}