public function view() { $ct = Type::getByDefaultsPage($this->page); $template = Template::getByID($this->page->getPageTemplateID()); $pl = new PageList(); $pl->filterByPageTypeID($ct->getPageTypeID()); $pl->filterByPageTemplate($template); $pl->ignorePermissions(); $this->set('total', $pl->getTotalResults()); }
public function testFilterByPath() { $this->createPage('More Fun', '/test-page-1/foobler'); $this->list->filterByPath('/test-page-1'); $totalResults = $this->list->getTotalResults(); $this->assertEquals(2, $totalResults); $nl = new \Concrete\Core\Page\PageList(); $nl->ignorePermissions(); $nl->filterbyPath('/test-page-1', false); $pagination = $nl->getPagination(); $this->assertEquals(1, $pagination->getNBResults()); }
public function getTotalResults() { return parent::getTotalResults(); }