/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/View/Design/Theme/Label.php
63 строки
1 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2014 Adobe * All Rights Reserved. */ /** * Theme_Label class used for system configuration */ namespace Magento\Framework\View\Design\Theme; class Label implements \Magento\Framework\Option\ArrayInterface { /** * Labels collection array * * @var array */ protected $_labelsCollection; /** * Constructor * * @param \Magento\Framework\View\Design\Theme\Label\ListInterface $labelList */ public function __construct(\Magento\Framework\View\Design\Theme\Label\ListInterface $labelList) { $this->_labelsCollection = $labelList; } /** * Return labels collection array * * @param bool|string $label add empty values to result with specific label * @return array */ public function getLabelsCollection($label = false) { $options = $this->_labelsCollection->getLabels(); if ($label) { array_unshift($options, ['value' => '', 'label' => $label]); } return $options; } /** * Return labels collection for backend system configuration with empty value "No Theme" * * @return array */ public function getLabelsCollectionForSystemConfiguration() { return $this->toOptionArray(); } /** * {@inheritdoc} */ public function toOptionArray() { return $this->getLabelsCollection((string)new \Magento\Framework\Phrase('-- No Theme --')); } }