Skip to content

Commit 40d65a7

Browse files
committed
Code review changes
1 parent ba9f4f8 commit 40d65a7

File tree

1 file changed

+6
-4
lines changed
  • lib/internal/Magento/Framework/View/Element/UiComponent

1 file changed

+6
-4
lines changed

lib/internal/Magento/Framework/View/Element/UiComponent/Context.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class Context implements ContextInterface
9898
/**
9999
* @var AuthorizationInterface
100100
*/
101-
protected $authorization;
101+
private $authorization;
102102

103103
/**
104104
* @param PageLayoutInterface $pageLayout
@@ -123,9 +123,9 @@ public function __construct(
123123
UrlInterface $urlBuilder,
124124
Processor $processor,
125125
UiComponentFactory $uiComponentFactory,
126-
AuthorizationInterface $authorization,
127126
DataProviderInterface $dataProvider = null,
128-
$namespace = null
127+
$namespace = null,
128+
AuthorizationInterface $authorization = null
129129
) {
130130
$this->namespace = $namespace;
131131
$this->request = $request;
@@ -137,7 +137,9 @@ public function __construct(
137137
$this->urlBuilder = $urlBuilder;
138138
$this->processor = $processor;
139139
$this->uiComponentFactory = $uiComponentFactory;
140-
$this->authorization = $authorization;
140+
$this->authorization = $authorization ?: ObjectManager::getInstance()->get(
141+
AuthorizationInterface::class
142+
);
141143
$this->setAcceptType();
142144
}
143145

0 commit comments

Comments
 (0)