*/ class Mage_XmlConnect_Block_Adminhtml_Mobile_Form_Element_Image extends Varien_Data_Form_Element_Image { /** * Function fetches image Url actual or default * * @return string */ protected function _getUrl() { if ($this->getValue()) { if (strpos($this->getValue(), '://') === false) { $url = Mage::helper('xmlconnect/image')->getFileDefaultSizeSuffixAsUrl($this->getValue()); $url = Mage::helper('xmlconnect/image')->getMediaUrl($url); } else { $url = $this->getValue(); } } else { $url = $this->getDefaultValue(); } return $url; } /** * Get "clear" filename from element * * @return string */ public function getUploadName() { /** * Ugly hack to avoid $_FILES[..]['name'][..][..] */ $name = $this->getName(); $name = strtr($name, array('[' => '/', ']' => '')); return $name; } /** * Compose output html for element * * @return string */ public function getElementHtml() { $html = '
'; return $html; } }