Show the form for editing the specified page.

@param Page $page
@return Response
160743
public function edit(Page $page)
    {
        // fix for when you
        // edit sections from the edit page
        // or delete photo/document then
        // need to update resource url
        save_resource_url();

        $parents = Page::getAllList();
        $banners = Banner::getAllList();

        return $this->view('titan::pages.create_edit', compact('parents', 'banners'))->with('item', $page);
    }
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();
    }
33999
public function update(Page &$page)
    {
        $data = $page->exportData();
        $endpoint= '/admin/pages/'.$page->id.'.json';
        $response = $this->request(
            $endpoint, 'PUT', array(
            'page' => $data
            )
        );
        $page->setData($response['page']);
    }
693214
public function show(PageRequest $request, Page $page)
    {

        if ($page->exists) {
            $view = 'page::admin.page.show';
        } else {
            $view = 'page::admin.page.new';
        }

        return $this->response->setMetaTitle(trans('app.view') . ' ' . trans('page::page.name'))
            ->data(compact('page'))
            ->view($view)
            ->output();
    }
11370
public function page($page)
    {
        if (! $this->limit) return;
        $offset = $this->limit * ($page - 1);
        $this->offset($offset);
        return $this;
    }
980565
public function index(Page $page)
    {
        save_resource_url();

        $page->load('sections');

        return $this->view('titan::pages.components.page_components')->with('page', $page);
    }
530652
public function postNavigation(Request $request, Page $page)
    {
        $this->authorize('editNavBasic', $page);

        if (Gate::allows('editNavAdvanced', $page)) {
            $parent = Page::find($request->input('parent_id'));

            if ($parent) {
                $page->setParent($parent);
            }
        }

        $page
            ->setVisibleInNav($request->has('visible_in_nav'))
            ->setVisibleInCmsNav($request->has('visible_in_nav_cms'));

        PageFacade::save($page);
    }
199702
protected function settingsPostAction(Request $request, BasePage $page)
    {
        $entityManager = $this->getDoctrine()->getManager();
        $form = $this->createSettingsForm($page);

        $form->handleRequest($request);

        if ($form->isValid()) {
            $entityManager->persist($page);
            $entityManager->flush();

            $this->congrat($this->get('translator')->trans('victoire_page.update.success', [], 'victoire'));

            return $this->getViewReferenceRedirect($request, $page);
        }

        return [
            'success' => false,
            'message' => $this->get('victoire_form.error_helper')->getRecursiveReadableErrors($form),
            'html'    => $this->get('templating')->render(
                $this->getBaseTemplatePath().':settings.html.twig',
                [
                    'page'               => $page,
                    'form'               => $form->createView(),
                    'businessProperties' => $this->getBusinessProperties($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);
        }
    }
948376
public function setPage($page)
    {
        if (empty($page)) {
            return $this->clearPage();
        }

        session()->put($this->getSessionKey(static::TYPE_PAGE), $page);

        return $this;
    }
208704
public function handlePage($page)
	{
		/**
		 * Session stuff
		 */
		$this->page = $page;
		$this->saveSessionData('_grid_page', $page);

		$this->reload(['table']);
	}
1196797
protected function changePage($page)
    {
        $this->currentPage = $page;
        $this->manialinkFactory->update($this->manialink->getUserGroup());
    }
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']);
    }
1268211
public function editPage()
    {
        $page = Page::preload($this->_block->getPageId());
        if ($page->exists) {
            $paths = Path::getById($page->id);
            return View::make('coaster::pages.gallery', ['paths' => $paths, '_block' => $this->_block, 'can_delete' => Auth::action('gallery.delete', ['page_id' => $page->id]), 'can_edit_caption' => Auth::action('gallery.caption', ['page_id' => $page->id])]);
        } else {
            return 'page not found';
        }
    }
687888
public function delete(Request $request, $page)
    {
        // Set roles that have access
        $request->user()->authorizeRoles(['admin', 'editor']);

        $page = Page::withTrashed()->findOrFail($page);
        return view('page::pages.delete', ['page' => $page]);
    }
1304802
public function editPageSettingsAction(Request $request, $id)
	{
		/** @var PageInterface $page */
		$page = $this->admin->getObject($id);

		$layoutBlocks = $page->getLayoutBlock();

		$form = $this->admin->getForm();
		$form->setData($page);

		$form->handleRequest($request);

		$response = new Response();

		if($form->isSubmitted()){
			if($form->isValid()){
				$page->setStatus(PageInterface::STATUS_DRAFT);
				$page->setUpdatedAt();
				$page->setLayoutBlock($layoutBlocks);
				$this->admin->update($page);

				return $this->getAjaxEditResponse($form, $page);

			}
			$response->setStatusCode(422);
		}
		$view = $form->createView();
		$this->setFormTheme($view, $this->admin->getFormTheme());

		return $this->renderWithExtraParams(
			'@NetworkingInitCms/PageAdmin/page_settings_edit.html.twig',
			[
				'form' => $view,
                'object' => $page,
			],
			$response
		);
	}
208140
public
    function edit($id)
    {
        return $this->view(["row" => Model::findOrFail($id),'template'=>Template::pluck('title','id')->toArray()], "pages::admin.edit");
        //
    }