27 private $contextFactory;
39 parent::__construct($context,
$factory);
40 $this->contextFactory = $contextFactory
41 ?: ObjectManager::getInstance()->get(ContextFactory::class);
52 $handle = $this->_request->getParam(
'handle');
53 $namespace = $this->_request->getParam(
'namespace');
54 $buttons = $this->_request->getParam(
'buttons',
false);
55 $this->_view->loadLayout([
'default',
$handle],
true,
true,
false);
56 $layout = $this->_view->getLayout();
57 $context = $this->contextFactory->create(
59 'namespace' => $namespace,
60 'pageLayout' => $layout
64 $component = $this->factory->create($namespace,
null, [
'context' => $context]);
65 if ($this->validateAclResource($component->getContext()->getDataProvider()->getConfigData())) {
66 $uiComponent = $layout->getBlock($namespace);
71 $actionsToolbar = $layout->getBlock(ActionPool::ACTIONS_PAGE_TOOLBAR);
84 private function validateAclResource($dataProviderConfigData)
86 if (isset($dataProviderConfigData[
'aclResource'])
87 && !$this->_authorization->isAllowed($dataProviderConfigData[
'aclResource'])
89 if (!$this->_request->isAjax()) {
_redirect($path, $arguments=[])
__construct(Context $context, UiComponentFactory $factory, ContextFactory $contextFactory=null)