public function commit()
    {
        $settings = $this->_data;

        if (isset($settings['id'])) {
            $id = $settings['id'];
            unset($settings['id']);
            $section_id = SectionManager::edit($id, $settings);

            if ($section_id) {
                $section_id = $id;
            }
        } else {
            $section_id = SectionManager::add($settings);
        }

        if (is_numeric($section_id) && $section_id !== false) {
            for ($ii = 0, $length = count($this->_fields); $ii < $length; $ii++) {
                $this->_fields[$ii]->set('parent_section', $section_id);
                $this->_fields[$ii]->commit();
            }
        }
    }