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
File
FileList.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Framework\View\File
;
8
9
use
Magento\Framework\View\File
;
10
use
Magento\Framework\View\File\FileList\CollateInterface
;
11
15
class
FileList
16
{
22
protected
$files
= [];
23
29
protected
$collator
;
30
36
public
function
__construct
(
CollateInterface
$collator
)
37
{
38
$this->collator =
$collator
;
39
}
40
46
public
function
getAll
()
47
{
48
return
array_values($this->files);
49
}
50
58
public
function
add
(array
$files
)
59
{
60
foreach
(
$files
as $file) {
61
$identifier
= $file->getFileIdentifier();
62
if
(array_key_exists(
$identifier
, $this->files)) {
63
$filename
= $this->files[
$identifier
]->getFilename();
64
throw
new \LogicException(
65
"View file '{$file->getFilename()}' is indistinguishable from the file '{$filename}'."
66
);
67
}
68
$this->files[
$identifier
] = $file;
69
}
70
}
71
78
public
function
replace
(array
$files
)
79
{
80
$this->files = $this->collator->collate(
$files
, $this->files);
81
}
82
}
Magento\Framework\View\File\FileList\add
add(array $files)
Definition:
FileList.php:58
Magento\Framework\View\File\FileList\CollateInterface
Definition:
CollateInterface.php:12
Magento\Framework\View\File\FileList
Definition:
FileList.php:15
Magento\Framework\View\File\$filename
$filename
Definition:
File.php:21
Magento\Framework\View\File\FileList\__construct
__construct(CollateInterface $collator)
Definition:
FileList.php:36
Magento\Framework\View\File\FileList\$collator
$collator
Definition:
FileList.php:29
Magento\Framework\View\File
Magento\Framework\View\File\FileList\$files
$files
Definition:
FileList.php:22
Magento\Framework\View\File\FileList\replace
replace(array $files)
Definition:
FileList.php:78
Magento\Framework\View\File\FileList\getAll
getAll()
Definition:
FileList.php:46
Magento\Framework\View\File\$identifier
$identifier
Definition:
File.php:49