'hidden']; protected $_ddAttribs = []; public function getDtAttribs($key = false) { if (false !== $key) { return Qs_Array::get($this->_dtAttribs, $key); } return $this->_dtAttribs; } public function getDdAttribs($key = false) { if (false !== $key) { return Qs_Array::get($this->_ddAttribs, $key); } 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(); $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 = []; } $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'); } }