Generates a page list.

@return array The page list.
340255
public function getPages()
    {
        $numAdjacents = (int) floor(($this->maxPages - 3) / 2);

        if ($this->currentPage + $numAdjacents > $this->numPages) {
            $begin = $this->numPages - $this->maxPages + 2;
        } else {
            $begin = $this->currentPage - $numAdjacents;
        }
        if ($begin < 2) {
            $begin = 2;
        }

        $end = $begin + $this->maxPages - 2;
//        if ($end >= $this->numPages) $end = $this->numPages - 1;

//        $tmpBegin = $this->maxPages - floor($this->maxPages / 2);
//        $tmpEnd = $tmpBegin + $this->maxPages - 1;
//
//        if ($tmpBegin < 1) {
//            $tmpEnd += 1 - $tmpBegin;
//            $tmpBegin = 1;
//        }
//
//        if ($tmpEnd > $this->getLastPage()) {
//            $tmpBegin -= $tmpEnd - $this->getLastPage();
//            $tmpEnd = $this->getLastPage();
//        }
//
//        $begin = min($tmpBegin, 2);
//        $end = $tmpEnd;

        return range($begin, $end, 1);
    }
759750
protected function getPidList(): array
    {
        $rootPIDs = explode(',', $this->settings['pages']);
        $pidList = $rootPIDs;

        // iterate through root-page ids and merge to array
        foreach ($rootPIDs as $pid) {
            $result = $this->queryGenerator->getTreeList($pid, $this->settings['recursive'], 0, 1);
            if ($result) {
                $subtreePids = explode(',', $result);
                $pidList = array_merge($pidList, $subtreePids);
            }
        }
        return $pidList;
    }
753544
protected function _getCurrentPages()
    {
        $ret = array();
        $p = $this->getData()->getPage();
        while ($p) {
            $ret[] = $p;
            $p = $p->getParentPage();
        }
        return $ret;
    }
523240
protected function pages_prepare_next(){
		if($this->page_next<=$this->pages_count){
			$url=$this->generateurl($this->page_next);
			$this->pages[]=(object)array(
				'name'=>'&gt;',
				'url'=>$url,
				'active'=>($this->page_next==$this->page_active),
				'disabled'=>false
				);
			}else{
			$this->pages[]=(object)array(
				'name'=>'&gt;',
				'url'=>'',
				'active'=>false,
				'disabled'=>true
				);
			}
		}
187300
public function generatePluginListing()
    {
        $html = $this->generateHeader('Plugins');

        $html .= '<section><h1>Plugins</h1>';
        $html .= '<table class="propTable">';
        foreach ($this->server->getPlugins() as $plugin) {
            $info = $plugin->getPluginInfo();
            $html .= '<tr><th>'.$info['name'].'</th>';
            $html .= '<td>'.$info['description'].'</td>';
            $html .= '<td>';
            if (isset($info['link']) && $info['link']) {
                $html .= '<a href="'.$this->escapeHTML($info['link']).'"><span class="oi" data-glyph="book"></span></a>';
            }
            $html .= '</td></tr>';
        }
        $html .= '</table>';
        $html .= '</section>';

        /* Start of generating actions */

        $html .= $this->generateFooter();

        return $html;
    }
436466
protected function createPages()
    {
        $this->setCliMessage('Creating pages...');

        $pages = array();

        $pages[] = array(
            'title' => 'Contact us',
            'description' => 'Contact information',
        );

        $pages[] = array(
            'title' => 'Help',
            'description' => 'Help information. Coming soon...',
        );

        foreach ($pages as $page) {

            $page += array(
                'status' => 1,
                'user_id' => $this->context['user_id'],
                'store_id' => $this->context['store_id']
            );

            $this->getPageModel()->add($page);
        }
    }
502325
public function generateLinks() {
        return '<' . $this->generateUrl($this->getNextPageQueryCriteria()) . '>; rel="next",'
        . '<' . $this->generateUrl($this->getLastPageQueryCriteria()) . '>; rel="last",'
        . '<' . $this->generateUrl($this->getFirstPageQueryCriteria()) . '>; rel="first",'
        . '<' . $this->generateUrl($this->getPreviousPageQueryCriteria()) . '>; rel="prev"';
    }
967119
public function getTotalPages()
    {
        if (!isset($this->pages)) {
            $recordCount = $this->getTotalRecordCount();
            if ($this->max > 0) {
                $this->pages = ceil($recordCount / $this->max);
            } else {
                $this->pages = 0;
            }
        }

        return $this->pages;
    }
540770
public function toArray()
        {
            return array_merge(
                $this->getCustomProperties(),
                array(
                    'label'             => $this->getlabel(),
                    'fragment'          => $this->getFragment(),
                    'id'                => $this->getId(),
                    'class'             => $this->getClass(),
                    'title'             => $this->getTitle(),
                    'target'            => $this->getTarget(),
                    'accesskey'         => $this->getAccesskey(),
                    'rel'               => $this->getRel(),
                    'rev'               => $this->getRev(),
                    'customHtmlAttribs' => $this->getCustomHtmlAttribs(),
                    'order'             => $this->getOrder(),
                    'resource'          => $this->getResource(),
                    'privilege'         => $this->getPrivilege(),
                    'active'            => $this->isActive(),
                    'visible'           => $this->isVisible(),
                    'type'              => get_class($this),
                    'pages'             => parent::toArray()
                )
            );
        }
908509
protected function getPages()
    {
        $pages = $this->pages;
        ksort($pages);
        $pages = array_values($pages);

        return $pages;
    }
359373
protected function getPageList()
    {
        //Get CMS page list
        $obPageList = $this->getCmsPageList();

        //Get static page list
        $obStaticPageList = $this->getStaticPageList();
        if (!empty($obStaticPageList)) {
            if (empty($obPageList)) {
                return $obStaticPageList;
            }

            $obPageList = $obPageList->merge($obStaticPageList->all());
        }

        return $obPageList;
    }
789886
public function index()
    {
        $this->authorize(Policies\PagesPolicy::PERMISSION_LIST);

        $pages = Page::with(['footers'])->paginate(50);

        $this->setTitle($title = trans('seo::pages.titles.pages-list'));
        $this->addBreadcrumb($title);

        return $this->view('admin.pages.index', compact('pages'));
    }
472229
public static function get_page_templates() {
		static $wrappers = [];
		if ( $wrappers ) {
			return $wrappers;
		}

		$page_templates = new Model\Page_Templates();
		$wrappers = $page_templates->get();
		return $wrappers;
	}
978661
protected function getRenderedList()
    {
        $enrichedState = $this->enrichStateWithDefaultsFromConfiguration();
        $results = $this->getResults($enrichedState);

        $oResponse = new MTShopArticleListResponse();
        $oResponse->bHasNextPage = ($results->getNumberOfPages() > $results->getPage() + 1);
        $oResponse->bHasPreviousPage = ($results->getPage() > 0);
        $oResponse->iListKey = $this->sModuleSpotName;
        $oResponse->iNumberOfResults = $results->getTotalNumberOfResults();

        $template = $this->getListTemplateFromConfigName($this->aModuleConfig['view']);
        $oResponse->sItemPage = $this->renderProducts($template);

        return $oResponse;
    }
62613
private function page_table_list(){
		$table_defs_all = $this->exdb->get_table_definition_all();
		// var_dump($table_defs_all);
		$table_list = array();
		foreach( $table_defs_all->tables as $table_def ){
			// var_dump($table_def);
			$table = array();
			$table['label'] = $table_def->label;
			$table['name'] = $table_def->name;
			$table['href'] = $this->generate_url($table_def->name);
			array_push($table_list, $table);
		}
		$rtn = $this->render(
			'form_table_list.html',
			array(
				'table_list'=>$table_list,
			)
		);
		// var_dump($table_list);
		$rtn = $this->wrap_theme($rtn);
		return $rtn;
	}
127230
public function pages()
    {
        //Returns on pages index
        if ($this->request->isUrl(['_name' => 'pagesCategories'])) {
            return;
        }

        $pages = $this->Pages->find('active')
            ->select(['title', 'slug'])
            ->order([sprintf('%s.title', $this->Pages->getAlias()) => 'ASC'])
            ->cache(sprintf('widget_list'), $this->Pages->getCacheName())
            ->all();

        $this->set(compact('pages'));
    }
8177
public function getPages()
    {
        $pages = array();

        if ($this->pages <= 1) {
            return array();
        }

        if ($this->pages <= $this->limit_pages) {
            for ($i = 1; $i <= $this->pages; $i++) {
                $pages[] = $this->createPage($i, $i == $this->current);
            }

            return $pages;
        }

        $num_adjacents = (int) floor(($this->limit_pages - 3) / 2);

        if ($this->current + $num_adjacents > $this->pages) {
            $sliding_start = $this->pages - $this->limit_pages + 2;
        } else {
            $sliding_start = $this->current - $num_adjacents;
        }

        if ($sliding_start < 2) {
            $sliding_start = 2;
        }

        $sliding_end = $sliding_start + $this->limit_pages - 3;

        if ($sliding_end >= $this->pages) {
            $sliding_end = $this->pages - 1;
        }

        $pages[] = $this->createPage(1, $this->current == 1);

        if ($sliding_start > 2) {
            $pages[] = $this->createPageEllipsis();
        }

        for ($i = $sliding_start; $i <= $sliding_end; $i++) {
            $pages[] = $this->createPage($i, $i == $this->current);
        }

        if ($sliding_end < $this->pages - 1) {
            $pages[] = $this->createPageEllipsis();
        }

        $pages[] = $this->createPage($this->pages, $this->current == $this->pages);

        return $pages;
    }