Skip to content

Commit 84b773d

Browse files
author
Roman Ganin
committed
MAGETWO-38809: Optimize Magento\Framework\View\Element\Template for production mode
- CR changes
1 parent edd9a9e commit 84b773d

File tree

2 files changed

+9
-5
lines changed
  • app/code/Magento/Store/etc
  • lib/internal/Magento/Framework/View/Element/Template/File

2 files changed

+9
-5
lines changed

app/code/Magento/Store/etc/di.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@
1515
<argument name="cache" xsi:type="object">Magento\Framework\App\Cache\Type\Config</argument>
1616
</arguments>
1717
</type>
18+
<type name="Magento\Framework\View\Element\Template\File\Validator">
19+
<arguments>
20+
<argument name="scope" xsi:type="string">store</argument>
21+
</arguments>
22+
</type>
1823
<type name="Magento\Store\Model\Config\Reader\Website">
1924
<arguments>
2025
<argument name="scopePool" xsi:type="object">Magento\Framework\App\Config\ScopePool\Proxy</argument>

lib/internal/Magento/Framework/View/Element/Template/File/Validator.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,15 @@ class Validator
7272
*
7373
* @param \Magento\Framework\Filesystem $filesystem
7474
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface
75+
* @param string|null $scope
7576
*/
7677
public function __construct(
7778
\Magento\Framework\Filesystem $filesystem,
78-
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface
79+
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfigInterface,
80+
$scope = null
7981
) {
8082
$this->_filesystem = $filesystem;
81-
$this->_isAllowSymlinks = $scopeConfigInterface->getValue(
82-
self::XML_PATH_TEMPLATE_ALLOW_SYMLINK,
83-
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
84-
);
83+
$this->_isAllowSymlinks = $scopeConfigInterface->getValue(self::XML_PATH_TEMPLATE_ALLOW_SYMLINK, $scope);
8584
$this->_themesDir = $this->_filesystem->getDirectoryRead(DirectoryList::THEMES)->getAbsolutePath();
8685
$this->_appDir = $this->_filesystem->getDirectoryRead(DirectoryList::APP)->getAbsolutePath();
8786
$this->_compiledDir = $this->_filesystem->getDirectoryRead(DirectoryList::TEMPLATE_MINIFICATION_DIR)

0 commit comments

Comments
 (0)