*/ namespace Magento\Framework\Data\Form\Element; class Editablemultiselect extends \Magento\Framework\Data\Form\Element\Multiselect { /** * Name of the default JavaScript class that is used to make multiselect editable * * This class must define init() method and receive configuration in the constructor */ const DEFAULT_ELEMENT_JS_CLASS = 'EditableMultiselect'; /** * Retrieve HTML markup of the element * * @return string */ public function getElementHtml() { $html = parent::getElementHtml(); $selectConfig = $this->getData('select_config'); if ($this->getData('disabled')) { $selectConfig['is_entity_editable'] = false; } $elementJsClass = self::DEFAULT_ELEMENT_JS_CLASS; if ($this->getData('element_js_class')) { $elementJsClass = $this->getData('element_js_class'); } $selectConfigJson = \Zend_Json::encode($selectConfig); $jsObjectName = $this->getJsObjectName(); // TODO: TaxRateEditableMultiselect should be moved to a static .js module. $html .= " "; return $html; } /** * Retrieve HTML markup of given select option * * @param array $option * @param string[] $selected * @return string */ protected function _optionToHtml($option, $selected) { $html = '' . "\n"; return $html; } }