public static function add(array $settings)
    {
        $defaults = array();
        $defaults['creation_date'] = $defaults['modification_date'] = DateTimeObj::get('Y-m-d H:i:s');
        $defaults['creation_date_gmt'] = $defaults['modification_date_gmt'] = DateTimeObj::getGMT('Y-m-d H:i:s');
        $defaults['author_id'] = 1;
        $defaults['modification_author_id'] = 1;
        $settings = array_replace($defaults, $settings);
        if (!Symphony::Database()->insert($settings, 'tbl_sections')) {
            return false;
        }

        return Symphony::Database()->getInsertID();
    }
public static function add(array $settings)
    {
        $defaults = array();
        $defaults['creation_date'] = $defaults['modification_date'] = DateTimeObj::get('Y-m-d H:i:s');
        $defaults['creation_date_gmt'] = $defaults['modification_date_gmt'] = DateTimeObj::getGMT('Y-m-d H:i:s');
        $defaults['author_id'] = 1;
        $defaults['modification_author_id'] = 1;
        $settings = array_replace($defaults, $settings);
        if (!Symphony::Database()->insert($settings, 'tbl_sections')) {
            return false;
        }

        return Symphony::Database()->getInsertID();
    }
public static function add ( array $ settings ) { $ defaults = array ( ) ; $ defaults [ 'creation_date' ] = $ defaults [ 'modification_date' ] = DateTimeObj :: get ( 'Y-m-d H:i:s' ) ; $ defaults [ 'creation_date_gmt' ] = $ defaults [ 'modification_date_gmt' ] = DateTimeObj :: getGMT ( 'Y-m-d H:i:s' ) ; $ defaults [ 'author_id' ] = 1 ; $ defaults [ 'modification_author_id' ] = 1 ; $ settings = array_replace ( $ defaults , $ settings ) ; if ( ! Symphony :: Database ( ) -> insert ( $ settings , 'tbl_sections' ) ) { return false ; } return Symphony :: Database ( ) -> getInsertID ( ) ; }
Takes an associative array of Section settings and creates a new
entry in the `tbl_sections` table, returning the ID of the Section.
The ID of the section is generated using auto_increment and returned
as the Section ID.

@param array $settings
An associative of settings for a section with the key being
a column name from `tbl_sections`
@throws DatabaseException
@return integer
The newly created Section's ID
Takes an associative array of Section settings and creates a new entry in the tbl_sections table returning the ID of the Section . The ID of the section is generated using auto_increment and returned as the Section ID .