Gets all static pages
@return array Static pages
@uses getAllPaths()
@uses getSlug()
@uses title()
487745
public static function all()
    {
        foreach (self::getAllPaths() as $path) {
            //Gets all files for each path
            $files = (new Folder($path))->findRecursive('^.+\.ctp$', true);

            foreach ($files as $file) {
                $pages[] = new Entity([
                    'filename' => pathinfo($file, PATHINFO_FILENAME),
                    'path' => rtr($file),
                    'slug' => self::getSlug($file, $path),
                    'title' => self::title(pathinfo($file, PATHINFO_FILENAME)),
                    'modified' => new FrozenTime(filemtime($file)),
                ]);
            }
        }

        return $pages;
    }
11472
public function getFilteredPages()
    {
        $pages = Versioned::get_including_deleted(SiteTree::class);
        $pages = $this->applyDefaultFilters($pages);

        $pages = $pages->filterByCallback(function (SiteTree $page) {
            // Doesn't exist on either stage or live
            return $page->isArchived();
        });
        return $pages;
    }
181967
public function all()
    {
        $data = [];

        $page      = 1;
        $fetch_all = true;

        $resourceName = constant($this->type . '::RESOURCE');
        $url          = sprintf("%s/%s", self::ENDPOINT, $resourceName);
        if (isset($this->params['page'])) {
            $page      = $this->params['page'];
            $fetch_all = false;
        }

        while (true) {
            $response = $this->fetch($this->buildUrl($url, $this->params), $resourceName);

            if (count($response) > 0) {
                foreach ($response as $item) {
                    $data[] = new $this->type($item);
                }

                if (!$fetch_all) {
                    break;
                } else {
                    $page++;
                    $this->where(['page' => $page]);
                }
            } else {
                break;
            }
        }

        return $data;
    }
1024978
public static function getStatics()
    {
        return array(
            'aliases' => self::$aliases,
            'app_root_dirs' => self::$app_root_dirs,
            'cli_detection' => self::$cli_detection,
            'display_called_from' => self::$display_called_from,
            'enabled_mode' => self::$enabled_mode,
            'expanded' => self::$expanded,
            'file_link_format' => self::$file_link_format,
            'max_depth' => self::$max_depth,
            'mode_default' => self::$mode_default,
            'mode_default_cli' => self::$mode_default_cli,
            'plugins' => self::$plugins,
            'renderers' => self::$renderers,
            'return' => self::$return,
        );
    }
611096
public function getAllRoutes(): array
  {
    foreach ($this->routesGet as $rout)
    {
      $this->routesAll[] = $rout;
    }

    foreach ($this->routesPost as $rout)
    {
      $this->routesAll[] = $rout;
    }

    return $this->routesAll;
  }
1097475
public function getAll()
    {
        if (filesize($this->filename) <= static::MAX_FILE_SIZE_FOR_CACHE) {
            $return = $this->query(new Query());
        } else {
            $return = $this->getIterator();
        }

        return $return;
    }
83737
public function getAllFiles()
    {
        $ext   = $this->formatter->getFileExtension();
        $files = array();
        $this->getFilesRecursive($this->path, $files, $ext);

        return $files;
    }
1263912
public function all()
    {
        $list = [];

        /** @var UniformResourceLocator $locator */
        $locator = $this->grav['locator'];

        $iterator = $locator->getIterator('themes://');

        /** @var \DirectoryIterator $directory */
        foreach ($iterator as $directory) {
            if (!$directory->isDir() || $directory->isDot()) {
                continue;
            }

            $theme = $directory->getFilename();
            $result = $this->get($theme);

            if ($result) {
                $list[$theme] = $result;
            }
        }
        ksort($list);

        return $list;
    }
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;
    }
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;
    }
839064
public function getPages(): array
    {
        if ($this->_pages !== null) {
            return $this->_pages;
        }

        $this->_pages = [];
        $pages = explode('<!--pagebreak-->', (string)$this);

        foreach ($pages as $page) {
            $this->_pages[] = new \Twig_Markup($page, Craft::$app->charset);
        }

        return $this->_pages;
    }
1319119
public function getList()
    {
        $routes = &gplcart_static('route.list');

        if (isset($routes)) {
            return $routes;
        }

        $routes = (array) gplcart_config_get(GC_FILE_CONFIG_ROUTE);
        $this->hook->attach('route.list', $routes, $this);
        return $routes;
    }
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);
    }
256134
protected function all() : array
	{
		//TODO: refactor this when working on the front end.

		$breadcrumb = $this->data->except('page');

		if ($this->data->has('category')) {
			$breadcrumb = $breadcrumb->merge($this->category());
		}

		return $breadcrumb->all();
	}
572197
private function getCmsRoutes(): array
    {
        if ($this->routes) {
            return $this->routes;
        }

        $item = $this->cache->getItem(self::PAGES_ROUTES_CACHE_KEY);

        if ($item->isHit()) {
            return $this->routes = $item->get();
        }

        $routes = $this->repository->getPagesRoutes();

        $item->set($routes);
        $this->cache->save($item);

        return $this->routes = $routes;
    }
145462
public function getSlices()
    {
        $controllers = ArrayList::create();

        if(
            $this->owner instanceof \VirtualPage
            && ($original = $this->owner->CopyContentFrom())
            && $original->hasExtension(self::class))
        {
            $slices = $original->PageSlices();
        } else {
            $slices = $this->owner->PageSlices();
        }

        if ($slices) {
            /** @var PageSlice $slice */
            foreach ($slices as $slice) {
                $controller = $slice->getController();
                $controller->init();
                $controllers->push($controller);
            }
            return $controllers;
        }

        return $controllers;
    }
905058
public function getPagesRoutes()
    {
        $qb = $this->createQueryBuilder('p');

        $results = $qb
            ->select('p.route')
            ->getQuery()
            ->getScalarResult();

        return array_column($results, 'route');
    }