add a item to the end of the page array

@param array $pageArray
@param integer $page
@param string $type
@return array
507640
protected function addItemToTheEndOfPageArray($pageArray, $page, $type)
    {
        $pageArray[] = [
            'page' => $page,
            'label' => $this->paginationConfig['labels'][$type],
            'type' => $type
        ];

        return $pageArray;
    }
941967
public function addPage(Page $page): Category
    {
        $this->children->add($page);

        if ($page->getCategory() !== $this) {
            $page->setCategory($this);
        }

        return $this;
    }
1260110
public function paginate($perPage, $page = null)
    {
        if (empty($page)) {
            $page = request('page', 1);
        }
        $offset = ($page * $perPage) - $perPage;

        $collection = $this->all();
        $newItems = array_slice($collection, $offset, $perPage, true);
        return $this->createChildCollection($newItems);
    }
836859
public function trackPage($page = null, $title = null, $type = self::TYPE_PAGEVIEW)
	{
		if (!defined('self::TYPE_'. strtoupper($type))) {
			throw new AnalyticsArgumentException('Type variable can\'t be of this type.');
		}

		$item = "ga('send', 'pageview');";

		if ($page !== null || $title !== null) {
			$page = ($page === null ? "window.location.href" : "'{$page}'");
			$title = ($title === null ? "document.title" : "'{$title}'");
			$item = "ga('send', { 'hitType': '{$type}', 'page': {$page}, 'title': {$title} });";
		}

		$this->addItem($item);
	}
735447
protected function addArray($type, array $array)
    {
        if (!isset($array['loc'])) {
            return false;
        }
        $array['loc'] = $this->urlEncode(trim($array['loc']));
        if ($this->urlValidate($array['loc'])) {
            switch ($type) {
                case self::XML_TAG_SITEMAP:
                    $this->sitemaps[$array['loc']] = $this->fixMissingTags(['lastmod'], $array);
                    return true;
                case self::XML_TAG_URL:
                    $this->urls[$array['loc']] = $this->fixMissingTags(['lastmod', 'changefreq', 'priority'], $array);
                    return true;
            }
        }
        return false;
    }
1367812
function GrantAddContentToPage(Page $page)
    {
        //dummy content for evaluation
        $content = new Content();
        $content->SetUserGroup(GroupFinder::FindPageGroup($page));
        $pageRights = RightsFinder::FindPageRights($page);
        if ($pageRights)
        {
            $content->SetUserGroupRights($pageRights->GetContentRights());
        }
        return $this->Grant(BackendAction::Create(), $content);
    }
1331898
public function addPageFilter(Page $page)
    {
        if ($page && !$page->isRoot()) {
            $this->leftJoin('cc._mainnode', 'p')
                    ->leftJoin('p._section', 'sp')
                    ->andWhere('sp._root = :selectedPageRoot')
                    ->andWhere('sp._leftnode >= :selectedPageLeftnode')
                    ->andWhere('sp._rightnode <= :selectedPageRightnode')
                    ->setParameters([
                        'selectedPageRoot' => $page->getSection()->getRoot(),
                        'selectedPageLeftnode' => $page->getLeftnode(),
                        'selectedPageRightnode' => $page->getRightnode(),
                    ]);
        }
    }
407287
public function index($type, array $parameters = array(), $page = null)
    {
        $url = 'projects/recordings.json';

        $recordings = $this->client->get($url, [
            'query' => array_merge([
                'type' => $type,
                'page' => $page,
            ], $parameters)
        ]);

        return $this->indexResponse($recordings, Recording::class);
    }
710578
public function addPage(PageInterface $page)
    {
        $this->items[$page->path()] = ['slug' => $page->slug()];

        return $this;
    }
1220507
public function page($page, $count)
    {
        $pagination = new Pagination($page, $count);
        $this->option->offset = $pagination->getLimitOffset();
        $this->option->limit = $count;
        return $this;
    }
367980
private function addAddressArray(array $address_array, $type)
    {
        foreach ($address_array as $address => $name) {

            if (!method_exists($this, $type)) {
                return false;
            }

            if (is_int($address)) {
                $this->$type($name);
            } else {
                $this->$type($address, $name);
            }
        }

        return true;
    }
669333
public function TopAnime(int $page = 1, ?string $type = null): array
    {
        return $this->myanimelist->getTopAnime(
            new Request\Top\TopAnimeRequest($page, $type)
        );
    }
736491
public static function array_page(array $array, $page=1, $pageSize=10)
    {
        if (!is_array($array)) {
            return array();
        }
        //总数量
        $totalCount = count($array);
        $page       = max(intval($page), 1);
        $pageSize   = max(intval($pageSize), 0);
        $start      = ($page-1) * $pageSize;
        $tmp        = array_slice($array, $start, $pageSize);
        $tmp ? $tmp : $tmp=array();
        return $tmp;
    }
539893
public function addChild(Page $page): Page
    {
        $this->children->add($page);

        if ($page->getParent() !== $this) {
            $page->setParent($this);
        }

        return $this;
    }
569915
public function prepend($page, $key = null)
    {
        if (! ($page instanceof PageInterface)) {
            throw new \InvalidArgumentException('$page must be instance of PageInterface');
        }

        return parent::prepend($page, $page->getId());
    }
1063484
protected function renderTemplateButton($type,$page){
        $options = $this->{$type.'LiButtonOptions'};
        $linkWrapTag = ArrayHelper::remove($options, 'tag', 'li');
        Html::addCssClass($options, $this->{$type.'LiButtonCssClass'});

        $buttonOptions = $this->{$type.'ButtonOptions'};
        $buttonOptions['id']=$this->{$type.'ButtonIdHeader'}.self::${$type.'Counter'};
        return Html::tag($linkWrapTag, Html::a($this->{$type.'ButtonLabel'},$this->pagination->createUrl($page),$buttonOptions),$options);
    }
987406
public function pageInfo(array $data, $type)
    {
        $form = $this->adminPageInfoForm;
        $form->setHydrator(new HydratorPageInfo());
        $class = $this->collectionOptions->getEntityOptions()->getPageInfo();
        $form->bind(new $class());
        $form->setData($data);
        if (!$form->isValid()) {
            return false;
        }

        /** @var \PServerCore\Entity\PageInfo $pageInfo */
        $pageInfo = $form->getData();
        $pageInfo->setType($type);

        $this->entityManager->persist($pageInfo);
        $this->entityManager->flush();

        return $pageInfo;
    }