Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
View
Asset
MergeStrategy
FileExists.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\View\Asset\MergeStrategy
;
7
8
use
Magento\Framework\App\Filesystem\DirectoryList
;
9
13
class
FileExists
implements
\Magento\Framework\View\Asset\MergeStrategyInterface
14
{
18
protected
$strategy
;
19
23
protected
$filesystem
;
24
29
public
function
__construct
(
30
\
Magento
\Framework\View\
Asset
\
MergeStrategyInterface
$strategy
,
31
\
Magento
\Framework\
Filesystem
$filesystem
32
) {
33
$this->strategy =
$strategy
;
34
$this->filesystem =
$filesystem
;
35
}
36
40
public
function
merge
(array $assetsToMerge, \
Magento
\Framework\View\
Asset
\
LocalInterface
$resultAsset)
41
{
42
$dir = $this->filesystem->getDirectoryRead(
DirectoryList::STATIC_VIEW
);
43
if
(!$dir->isExist($resultAsset->getPath())) {
44
$this->strategy->merge($assetsToMerge, $resultAsset);
45
}
46
}
47
}
Magento\Framework\App\Filesystem\DirectoryList\STATIC_VIEW
const STATIC_VIEW
Definition:
DirectoryList.php:53
Magento\Framework\View\Asset\MergeStrategy\FileExists\__construct
__construct(\Magento\Framework\View\Asset\MergeStrategyInterface $strategy, \Magento\Framework\Filesystem $filesystem)
Definition:
FileExists.php:29
Magento\Framework\Filesystem
Definition:
Filesystem.php:16
Magento\Framework\View\Asset\MergeStrategy\FileExists\merge
merge(array $assetsToMerge, \Magento\Framework\View\Asset\LocalInterface $resultAsset)
Definition:
FileExists.php:40
Magento\Framework\View\Asset\MergeStrategy\FileExists\$strategy
$strategy
Definition:
FileExists.php:18
Magento\Framework\View\Asset\MergeStrategy\FileExists
Definition:
FileExists.php:13
Magento\Framework\View\Asset\MergeStrategy\FileExists\$filesystem
$filesystem
Definition:
FileExists.php:23
Magento\Framework\View\Asset\MergeStrategyInterface
Definition:
MergeStrategyInterface.php:11
Magento\Framework\View\Asset
Definition:
Asset.php:10
Magento
Magento\Framework\View\Asset\LocalInterface
Definition:
LocalInterface.php:13
Magento\Framework\App\Filesystem\DirectoryList
Definition:
DirectoryList.php:13
Magento\Framework\View\Asset\MergeStrategy
Definition:
Checksum.php:6