Create a new page

@link   https://help.shopify.com/api/reference/page#create
@param  Page $page
@return void
163318
public function create(Page &$page)
    {
        $data = $page->exportData();
        $endpoint= '/admin/pages.json';
        $response = $this->request(
            $endpoint, 'POST', array(
            'page' => $data
            )
        );
        $page->setData($response['page']);
    }
209016
private function AddPage(Page $page)
    {
        if (!$this->PageAllowed($page))
        {
            return;
        }
        $params = FrontendRouter::GatherParams($page->GetUrl());
        if (count($params) == 0)
        {
            $changeFreq = ChangeFrequency::ByValue($page->GetSitemapChangeFrequency());
            $priority = $page->GetSitemapRelevance();
            $lastLog = LogEvaluator::LastPageModLog($page, $this->resolver);
            $lastMod = $lastLog ? $lastLog->GetChanged() : null;
            $this->sitemap->AddUrl(FrontendRouter::PageUrl($page), $changeFreq, $priority, $lastMod);
        }
    }
1196797
protected function changePage($page)
    {
        $this->currentPage = $page;
        $this->manialinkFactory->update($this->manialink->getUserGroup());
    }
1354685
public function render(Page $page)
    {
        return $this->doRender(
            $this->getRawContent(),
            $this->getAttributes() + ['content' => $page->getRenderedContent()]
        );
    }
568912
function set_page($page) {
        global $PAGE;

        $this->page = $page;
        $this->title = $page->title;
        // set_title calls format_string itself so no probs there
        $PAGE->set_title($this->title);
    }
1306393
public function addPage(PagingPage $page)
    {
        if (!in_array($page, $this->pages, true)) {
            array_push($this->pages, $page);
        }
        return $this;
    }
1048782
public function setCurrentPage($page)
  {
    $this->currentPage = $page;
    $this->forcedPage = true;
    $this->updateTable();
  }
1230422
protected function preparePage(array &$page)
    {
        $user = $this->user->get($page['user_id']);

        $this->setItemAlias($page, 'page', $this->alias);
        $this->setItemImages($page, 'page', $this->image);
        $this->setItemTranslation($page, 'page', $this->translation_entity);

        if (!empty($page['images'])) {
            foreach ($page['images'] as &$file) {
                $this->setItemTranslation($file, 'file', $this->translation_entity);
            }
        }

        $page['author'] = isset($user['email']) ? $user['email'] : $this->text('Unknown');
    }
300815
public function setPage($page)
    {
        if ($page < 1) {
            $page = 1;
        }

        if ($this->range == 0) {
            $this->setRange(25);
        }

        $this->start = ($page - 1) * $this->range;

        return $this;
    }
1133915
protected function loadPage($page)
    {
        $this->pageStart = $page * $this->pageSize;
        $this->pageData = $this->query->setFirstResult($this->pageStart)->setMaxResults($this->pageSize)->getResult();
    }
1345419
private function GrantOnPage(Page $page)
    {
        $groups = MembergroupUtil::PageMembergroups($page);
        return $this->GrantByProperties($page->GetGuestsOnly(), $page->GetPublish(), 
                $page->GetPublishFrom(), $page->GetPublishTo(), $groups);
        
    }
941967
public function addPage(Page $page): Category
    {
        $this->children->add($page);

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

        return $this;
    }
45349
public function update(Page $page)
    {
        $attributes = request()->validate(Page::$rules, Page::$messages);

        $attributes['is_header'] = boolval(input('is_header'));
        $attributes['is_hidden'] = boolval(input('is_hidden'));
        $attributes['is_footer'] = boolval(input('is_footer'));
        $attributes['is_featured'] = boolval(input('is_featured'));

        $page = $this->updateEntry($page, $attributes);
        $page->updateUrl()->save();
        $page->banners()->sync(input('banners'));

        return redirect_to_resource();
    }
1144053
public function setPage(\Amulen\PageBundle\Entity\Page $page = null) {
        $this->page = $page;

        return $this;
    }
178866
protected function createResponse(PageInterface $page)
    {
        if ($page->getTarget()) {
            $page->addHeader('Location', $this->router->generate($page->getTarget()));
            $response = new Response('', 302, $page->getHeaders() ?: []);
        } else {
            $response = new Response('', 200, $page->getHeaders() ?: []);
        }

        return $response;
    }
485098
public function paginate($page, $perPage = null)
    {
        $this->queryDefaults['paged'] = $page;
        $this->queryDefaults['posts_per_page'] = $perPage ?: get_option('posts_per_page');

        return $this;
    }
1300480
public function addPage(PageInterface $page, $route = null)
    {
        if (!isset($this->instances[$page->path()])) {
            $this->instances[$page->path()] = $page;
        }
        $route = $page->route($route);
        if ($page->parent()) {
            $this->children[$page->parent()->path()][$page->path()] = ['slug' => $page->slug()];
        }
        $this->routes[$route] = $page->path();

        $this->grav->fireEvent('onPageProcessed', new Event(['page' => $page]));
    }