_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 --')); } }