【问题标题】:Error when I run compile in Magento 2在 Magento 2 中运行编译时出错
【发布时间】:2017-09-28 05:19:29
【问题描述】:

我在运行编译时遇到问题 我收到此错误

编译过程中的错误: Ortho\Theme\Block\Html\Custommenu /var/www/vhosts/domux.eu/dmx/app/code/Ortho/Theme/Block/Html/Custommenu.php 中的 Ortho\Theme\Block\Html\Custommenu 类中的依赖项不正确 \Magento\Store\Model\StoreManagerInterface 已经存在于上下文对象中 错误总数:1

谁能告诉我我必须从这个 php 文件中删除或修改哪些代码?

 public function __construct(
        Template\Context $context,
        NodeFactory $nodeFactory,
        TreeFactory $treeFactory,
		CategoryFactory $categoryFactory,
        \Magento\Cms\Model\Template\FilterProvider $filterProvider,
        \Magento\Store\Model\StoreManagerInterface $storeManager,
        \Magento\Cms\Model\BlockFactory $blockFactory,
        Registry $registry,
        \Ortho\Theme\Helper\Data $dataHelper,
        array $data = []
    ) {
        parent::__construct($context,$nodeFactory,$treeFactory, $data);
        $this->categoryFactory = $categoryFactory;
        $this->_filterProvider = $filterProvider;
        $this->_storeManager = $storeManager;
        $this->_blockFactory = $blockFactory;
        $this->coreRegistry = $registry;
       // $this->dataHelper = $dataHelper;
        //$this->_menu = $this->getMenu();
$this->nodeFactory = $nodeFactory;
        $this->treeFactory = $treeFactory;
    }
	
	/**
     * Get block cache life time
     *
     * @return int
     */
    protected function getCacheLifetime()
    {
        return parent::getCacheLifetime() ?: 3600;
    }

	

非常感谢。 最好的问候

【问题讨论】:

    标签: magento2


    【解决方案1】:
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-08
    • 2011-12-04
    • 1970-01-01
    • 1970-01-01
    • 2016-05-06
    • 1970-01-01
    相关资源
    最近更新 更多