concrete/src/Page/Page.php
public static function getDrafts(Site $site)
    {
        $db = Database::connection();
        $nc = self::getDraftsParentPage($site);
        $r = $db->executeQuery('select Pages.cID from Pages inner join Collections c on Pages.cID = c.cID where cParentID = ? order by cDateAdded desc', [$nc->getCollectionID()]);
        $pages = [];
        while ($row = $r->FetchRow()) {
            $entry = self::getByID($row['cID']);
            if (is_object($entry)) {
                $pages[] = $entry;
            }
        }

        return $pages;
    }
public static function getDrafts(Site $site)
    {
        $db = Database::connection();
        $nc = self::getDraftsParentPage($site);
        $r = $db->executeQuery('select Pages.cID from Pages inner join Collections c on Pages.cID = c.cID where cParentID = ? order by cDateAdded desc', [$nc->getCollectionID()]);
        $pages = [];
        while ($row = $r->FetchRow()) {
            $entry = self::getByID($row['cID']);
            if (is_object($entry)) {
                $pages[] = $entry;
            }
        }

        return $pages;
    }
public static function getDrafts ( Site $ site ) { $ db = Database :: connection ( ) ; $ nc = self :: getDraftsParentPage ( $ site ) ; $ r = $ db -> executeQuery ( 'select Pages.cID from Pages inner join Collections c on Pages.cID = c.cID where cParentID = ? order by cDateAdded desc' , [ $ nc -> getCollectionID ( ) ] ) ; $ pages = [ ] ; while ( $ row = $ r -> FetchRow ( ) ) { $ entry = self :: getByID ( $ row [ 'cID' ] ) ; if ( is_object ( $ entry ) ) { $ pages [ ] = $ entry ; } } return $ pages ; }
Get the list of draft pages in a specific site.

@param \Concrete\Core\Entity\Site\Site $site

@return \Concrete\Core\Page\Page[]
Get the list of draft pages in a specific site .