Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
AbstractSwatch.php
Go to the documentation of this file.
1 <?php
7 
8 class AbstractSwatch extends \Magento\Framework\Data\Form\Element\Select
9 {
16  protected function getValues()
17  {
18  $options = [];
19  $attribute = $this->getData('entity_attribute');
20  if ($attribute instanceof \Magento\Catalog\Model\ResourceModel\Eav\Attribute) {
21  $options = $attribute->getSource()->getAllOptions(true, true);
22  }
23  return $options;
24  }
25 }
getData($key='', $index=null)
Definition: DataObject.php:119