Label.php 626 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Theme\Model\Design\Theme;
  7. class Label extends \Magento\Framework\View\Design\Theme\Label
  8. {
  9. /**
  10. * Return labels collection array
  11. *
  12. * @param bool|string $label add empty values to result with specific label
  13. * @return array
  14. */
  15. public function getLabelsCollection($label = false)
  16. {
  17. $options = parent::getLabelsCollection();
  18. if ($label) {
  19. array_unshift($options, ['value' => 0, 'label' => $label]);
  20. }
  21. return $options;
  22. }
  23. }