'hidden'); protected $_ddAttribs = array(); public function getDtAttribs() { return $this->_dtAttribs; } public function getDdAttribs() { return $this->_ddAttribs; } public function setDtAttribs(array $attribs) { $this->_dtAttribs = $attribs; return $this; } public function setDdAttribs(array $attribs) { $this->_ddAttribs = $attribs; return $this; } public function setDtAttrib($attrib, $value) { if (null === $value && array_key_exists($attrib, $this->_dtAttribs)) { unset($this->_dtAttribs[$attrib]); } else { $this->_dtAttribs[$attrib] = $value; } return $this; } public function setDdAttrib($attrib, $value) { if (null === $value && array_key_exists($attrib, $this->_ddAttribs)) { unset($this->_ddAttribs[$attrib]); } else { $this->_ddAttribs[$attrib] = $value; } return $this; } public function render($content) { $options = $this->getOptions(); $element = $this->getElement(); $elementName = $element->getName(); $elementId = $element->getId(); $view = $this->getElement()->getView(); $dtAttribs = $this->getDtAttribs(); $ddAttribs = $this->getDdAttribs(); if (isset($options['dtAttribs'])) { $dtAttribs = array_merge($dtAttribs, $options['dtAttribs']); } if (isset($options['ddAttribs'])) { $ddAttribs = array_merge($ddAttribs, $options['ddAttribs']); } if (!isset($dtAttribs['id'])) { $dtAttribs['id'] = $elementId . '-label'; } if (!isset($ddAttribs['id'])) { $ddAttribs['id'] = $elementId . '-element'; } if (isset($options['label'])) { unset($dtAttribs['class']); if (isset($options['labelAttribs'])) { $labelAttribs = $options['labelAttribs']; } else { $labelAttribs = array(); } $labelAttribs['disableFor'] = true; $label = $view->formLabel($element->getFullyQualifiedName(), trim($options['label']), $labelAttribs); } else { $label = ' '; } return $this->_getOpenTag('dt', $dtAttribs) . $label . $this->_getCloseTag('dt') . $this->_getOpenTag('dd', $ddAttribs) . $content . $this->_getCloseTag('dd'); } }