protected function fieldset(array $field)
    {
        $result = array(
            'form' => array(
                'legend' => array(
                    'title' => !empty($field['summary']) ? $field['summary'] : $field['legend'],
                ),
                'input' => $this->fields($field['fields']),
            ),
        );

        // Add description at the start of the fieldset as an html element.
        if (isset($field['description'])) {
            array_unshift($result['form']['input'], array('type' => 'html', 'name' => $field['name'] . '_description', 'html_content' => '<div class="help-block">' . $field['description'] . '</div>'));
        }

        // Add icon to legend.
        if (isset($field['icon'])) {
            $result['form']['legend']['icon'] = $field['icon'];
        }
        return $result;
    }