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
Design
Theme
Label.php
Go to the documentation of this file.
1
<?php
10
namespace
Magento\Framework\View\Design\Theme
;
11
12
class
Label
implements
\Magento\Framework\Option\ArrayInterface
13
{
19
protected
$_labelsCollection
;
20
26
public
function
__construct
(\
Magento
\Framework\View\Design\
Theme
\
Label
\
ListInterface
$labelList)
27
{
28
$this->_labelsCollection = $labelList;
29
}
30
37
public
function
getLabelsCollection
(
$label
=
false
)
38
{
39
$options
= $this->_labelsCollection->getLabels();
40
if
(
$label
) {
41
array_unshift(
$options
, [
'value'
=>
''
,
'label'
=>
$label
]);
42
}
43
return
$options
;
44
}
45
51
public
function
getLabelsCollectionForSystemConfiguration
()
52
{
53
return
$this->
toOptionArray
();
54
}
55
59
public
function
toOptionArray
()
60
{
61
return
$this->
getLabelsCollection
((
string
)
new
\
Magento
\Framework\
Phrase
(
'-- No Theme --'
));
62
}
63
}
Magento\Framework\View\Design\Theme\Label\$_labelsCollection
$_labelsCollection
Definition:
Label.php:19
Magento\Framework\View\Design\Theme\Label\getLabelsCollection
getLabelsCollection($label=false)
Definition:
Label.php:37
Magento\Framework\View\Design\Theme\Label
Definition:
Label.php:12
Magento\Framework\Option\ArrayInterface
Definition:
ArrayInterface.php:11
$label
$label
Definition:
details.phtml:21
Magento\Framework\View\Design\Theme\ListInterface
Definition:
ListInterface.php:14
Magento\Framework\View\Design\Theme
Magento
Magento\Framework\View\Design\Theme\Label\__construct
__construct(\Magento\Framework\View\Design\Theme\Label\ListInterface $labelList)
Definition:
Label.php:26
Magento\Framework\Config\Theme
Definition:
Theme.php:16
Magento\Framework\View\Design\Theme\Label\toOptionArray
toOptionArray()
Definition:
Label.php:59
Magento\Framework\Phrase
Definition:
Phrase.php:17
$options
$options
Definition:
multiple_mixed_products.php:29
Magento\Framework\View\Design\Theme\Label\getLabelsCollectionForSystemConfiguration
getLabelsCollectionForSystemConfiguration()
Definition:
Label.php:51