_getInfo($name, $value, $attribs); $id = $name = $value = $attribs = $options = $listsep = $disable = $resourceType = $resourceBaseUrl = null; extract($info); $browseId = $id . '-browse'; $deleteId = $id . '-delete'; $valueId = $id . '-value'; try { /** @var Qs_Doc $doc */ $doc = Zend_Registry::get('doc'); } catch (Zend_Exception $e) { trigger_error($e->getMessage()); } $doc->addScript('js/ckeditor/ckfinder/ckfinder.js', ['skipPacking' => true]); $doc->addScript('js/lib/form/element/media.js'); $doc->addInitObject('lib.form.element.Media', [[ 'id' => $id, 'browseId' => $browseId, 'deleteId' => $deleteId, 'valueId' => $valueId, 'resourceBaseUrl' => $resourceBaseUrl, 'emptyValue' => $this->_emptyValue, 'resourceType' => $resourceType, ]]); $disabled = ''; if ($disable) { $disabled = ' disabled="disabled"'; } if ($value) { $_value = str_replace($resourceBaseUrl . '/', '', $value); $_value = urldecode($_value); $_value = $this->view->escape($_value); $valueXhtml = '' . $_value . ''; } else { $valueXhtml = $this->_emptyValue; } $valueXhtml = '
' . $valueXhtml . '
'; $buttonsXhtml = 'Browse' . ' Delete'; $xhtml = '_htmlAttribs($attribs) . $this->getClosingBracket() . $valueXhtml . $buttonsXhtml; return $xhtml; } }