16 class Image extends \Magento\Framework\Data\Form\Element\AbstractElement
37 $this->_urlBuilder = $urlBuilder;
38 parent::__construct($factoryElement, $factoryCollection, $escaper,
$data);
51 if ((
string)$this->getValue()) {
54 if (!preg_match(
"/^http\:\/\/|https\:\/\//",
$url)) {
61 ' onclick="imagePreview(\'' .
63 '_image\'); return false;" ' .
77 '" height="22" width="22" class="small-image-preview v-middle" ' .
82 $this->setClass(
'input-file');
83 $html .= parent::getElementHtml();
97 if ($this->getValue()) {
99 $html .=
'<span class="delete-image">';
100 $html .=
'<input type="checkbox"' .
103 '[delete]" value="1" class="checkbox"' .
107 ($this->getDisabled() ?
' disabled="disabled"' :
'') .
109 $html .=
'<label for="' .
112 ($this->getDisabled() ?
' class="disabled"' :
'') .
130 return '<input type="hidden" name="' . parent::getName() .
'[value]" value="' . $this->getValue() .
'" />';
140 return $this->getValue();
getData($key='', $index=null)