【发布时间】: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