0

getScope() method generates:

Fatal error: Uncaught Error: Call to undefined method Magento\Framework\App\Config::getScope()

public function __construct(
    \Magento\Framework\ObjectManagerInterface $objectManager,
    \Magento\Framework\App\Config\ScopeConfigInterface $scope
) {
    $this->objectManager = $objectManager;
    $this->scope         = $scope;
    $this->entities      = $this->scope
        ->getScope(ScopeConfigInterface::SCOPE_TYPE_DEFAULT)
        ->getValue('oei/export_entities');
}
0

1 Answer 1

0

Delete getScope method will solve the problem.

public function __construct(
\Magento\Framework\ObjectManagerInterface $objectManager,
\Magento\Framework\App\Config\ScopeConfigInterface $scope
) {
$this->objectManager = $objectManager;
$this->scope         = $scope;
$this->entities      = $this->scope
    //->getScope(ScopeConfigInterface::SCOPE_TYPE_DEFAULT)
    ->getValue('oei/export_entities');
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.