Esempio n. 1
0
 public function startGroup(&$group, $required, $error)
 {
     $blockName = $this->_matchBlock($group);
     $this->_tpl->setCurrentBlock($blockName . '_loop');
     $this->_groupElementIdx = 0;
     $this->_groupSeparator = is_null($group->_separator) ? ' ' : $group->_separator;
     // show an '*' near the required element
     if ($required) {
         $this->_showRequired = true;
         if ($this->_tpl->blockExists($blockName . '_required')) {
             $this->_tpl->touchBlock($blockName . '_required');
         }
     }
     // show the error message or keep it for later use
     if (!empty($error)) {
         if ($this->_tpl->blockExists($blockName . '_error')) {
             $this->_tpl->setVariable('qf_error', $error);
         } else {
             $this->_errors[] = $error;
         }
     }
     $this->_tpl->setVariable('qf_group_label', $group->getLabel());
 }