public static function delete($page_id = null, $delete_files = true)
    {
        if (!is_int($page_id)) {
            return false;
        }

        $can_proceed = true;

        // Delete Files (if told to)
        if ($delete_files) {
            $page = PageManager::fetchPageByID($page_id, array('path', 'handle'));

            if (empty($page)) {
                return false;
            }

            $can_proceed = PageManager::deletePageFiles($page['path'], $page['handle']);
        }

        // Delete from tbl_pages/tbl_page_types
        if ($can_proceed) {
            PageManager::deletePageTypes($page_id);
            Symphony::Database()->delete('tbl_pages', sprintf(" `id` = %d ", $page_id));
            Symphony::Database()->query(sprintf(
                "UPDATE
                    tbl_pages
                SET
                    `sortorder` = (`sortorder` + 1)
                WHERE
                    `sortorder` < %d",
                $page_id
            ));
        }

        return $can_proceed;
    }
public static function delete($page_id = null, $delete_files = true)
    {
        if (!is_int($page_id)) {
            return false;
        }

        $can_proceed = true;

        // Delete Files (if told to)
        if ($delete_files) {
            $page = PageManager::fetchPageByID($page_id, array('path', 'handle'));

            if (empty($page)) {
                return false;
            }

            $can_proceed = PageManager::deletePageFiles($page['path'], $page['handle']);
        }

        // Delete from tbl_pages/tbl_page_types
        if ($can_proceed) {
            PageManager::deletePageTypes($page_id);
            Symphony::Database()->delete('tbl_pages', sprintf(" `id` = %d ", $page_id));
            Symphony::Database()->query(sprintf(
                "UPDATE
                    tbl_pages
                SET
                    `sortorder` = (`sortorder` + 1)
                WHERE
                    `sortorder` < %d",
                $page_id
            ));
        }

        return $can_proceed;
    }
public static function delete ( $ page_id = null , $ delete_files = true ) { if ( ! is_int ( $ page_id ) ) { return false ; } $ can_proceed = true ; // Delete Files (if told to) if ( $ delete_files ) { $ page = PageManager :: fetchPageByID ( $ page_id , array ( 'path' , 'handle' ) ) ; if ( empty ( $ page ) ) { return false ; } $ can_proceed = PageManager :: deletePageFiles ( $ page [ 'path' ] , $ page [ 'handle' ] ) ; } // Delete from tbl_pages/tbl_page_types if ( $ can_proceed ) { PageManager :: deletePageTypes ( $ page_id ) ; Symphony :: Database ( ) -> delete ( 'tbl_pages' , sprintf ( " `id` = %d " , $ page_id ) ) ; Symphony :: Database ( ) -> query ( sprintf ( "UPDATE
                    tbl_pages
                SET
                    `sortorder` = (`sortorder` + 1)
                WHERE
                    `sortorder` < %d" , $ page_id ) ) ; } return $ can_proceed ; }
This function takes a Page ID and removes the Page from the database
in `tbl_pages` and it's associated Page Types in `tbl_pages_types`.
This function does not delete any of the Page's children.

@see toolkit.PageManager#deletePageTypes
@see toolkit.PageManager#deletePageFiles
@param integer $page_id
The ID of the Page that should be deleted.
@param boolean $delete_files
If true, this parameter will remove the Page's templates from the
the filesystem. By default this is true.
@throws DatabaseException
@throws Exception
@return boolean
This function takes a Page ID and removes the Page from the database in tbl_pages and it s associated Page Types in tbl_pages_types . This function does not delete any of the Page s children .