public function group(array $fields)
    {
        $output = array();
        foreach ($fields as $name => $data) {
            if (is_array($data)) {
                list($data, $value, $class, $id) = $this->_findMainAttr($data);
                $output[] = $this->render($name, $value, $class, $id, $data);
            } else {
                $output[] = $this->render($name, $data);
            }
        }

        return implode(PHP_EOL, $output);
    }