예제 #1
0
 protected function _htmlAttribs(array $attribs)
 {
     $element = $this->getElement();
     if (!is_null($element)) {
         if (!is_null($attribs) && isset($attribs['class'])) {
             $attribs['class'] = $attribs['class'] . ' ' . $this->getElement()->getName() . '-data';
         } else {
             $attribs = array();
             $attribs['class'] = $this->getElement()->getName() . '-data';
         }
     }
     return parent::_htmlAttribs($attribs);
 }
예제 #2
0
 /**
  * Tag Attribute vorbereiten.
  * 
  * Das 'class' Attribute wird auf 'field' gesetzt und die 'id' auf die Element-ID plus '-element'.
  * 
  * @param array $attribs
  * @return array
  */
 protected function _htmlAttribs(array $attribs)
 {
     if (is_null($attribs)) {
         $attribs = array();
     }
     if (!isset($attribs['class'])) {
         $attribs['class'] = 'field';
     }
     $element = $this->getElement();
     if (!is_null($element)) {
         $attribs['id'] = $element->getId() . '-element';
     }
     return parent::_htmlAttribs($attribs);
 }