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();
            }
        }
    }
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();
            }
        }
    }
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 ( ) ; } } }
Commit the settings of this section from the section editor to
create an instance of this section in `tbl_sections`. This function
loops of each of the fields in this section and calls their commit
function.

@see toolkit.Field#commit()
@return boolean
true if the commit was successful, false otherwise.
Commit the settings of this section from the section editor to create an instance of this section in tbl_sections . This function loops of each of the fields in this section and calls their commit function .