concrete/src/Legacy/PageList.php
public function get($itemsToGet = 0, $offset = 0)
    {
        $pages = [];
        if ($this->getQuery() == '') {
            $this->setBaseQuery();
        }

        $this->setItemsPerPage($itemsToGet);

        $r = parent::get($itemsToGet, $offset);
        foreach ($r as $row) {
            $nc = $this->loadPageID($row['cID'], 'ACTIVE');
            if (!$this->displayOnlyApprovedPages) {
                $cp = new Permissions($nc);
                if ($cp->canViewPageVersions()) {
                    $nc->loadVersionObject('RECENT');
                }
            }
            $nc->setPageIndexScore($row['cIndexScore']);
            $pages[] = $nc;
        }

        return $pages;
    }
public function get($itemsToGet = 0, $offset = 0)
    {
        $pages = [];
        if ($this->getQuery() == '') {
            $this->setBaseQuery();
        }

        $this->setItemsPerPage($itemsToGet);

        $r = parent::get($itemsToGet, $offset);
        foreach ($r as $row) {
            $nc = $this->loadPageID($row['cID'], 'ACTIVE');
            if (!$this->displayOnlyApprovedPages) {
                $cp = new Permissions($nc);
                if ($cp->canViewPageVersions()) {
                    $nc->loadVersionObject('RECENT');
                }
            }
            $nc->setPageIndexScore($row['cIndexScore']);
            $pages[] = $nc;
        }

        return $pages;
    }
public function get ( $ itemsToGet = 0 , $ offset = 0 ) { $ pages = [ ] ; if ( $ this -> getQuery ( ) == '' ) { $ this -> setBaseQuery ( ) ; } $ this -> setItemsPerPage ( $ itemsToGet ) ; $ r = parent :: get ( $ itemsToGet , $ offset ) ; foreach ( $ r as $ row ) { $ nc = $ this -> loadPageID ( $ row [ 'cID' ] , 'ACTIVE' ) ; if ( ! $ this -> displayOnlyApprovedPages ) { $ cp = new Permissions ( $ nc ) ; if ( $ cp -> canViewPageVersions ( ) ) { $ nc -> loadVersionObject ( 'RECENT' ) ; } } $ nc -> setPageIndexScore ( $ row [ 'cIndexScore' ] ) ; $ pages [ ] = $ nc ; } return $ pages ; }
Returns an array of page objects based on current settings.
Returns an array of page objects based on current settings .