Возвращает разметку области контента

@param Eresus_CMS_Request $request
@param TClientUI          $page

@return Eresus_HTTP_Response
@since 3.01
486400
public function getHtml(Eresus_CMS_Request $request, TClientUI $page)
    {
        $tmpl = new Eresus_Template();
        $tmpl->setSource($page->content);
        $html = $tmpl->compile();
        $response = new Eresus_HTTP_Redirect($html);
        return $response;
    }
700852
private function loadPage()
    {
        $result = false;
        $main_fake = false;
        if (!count(Eresus_CMS::getLegacyKernel()->request['params']) ||
            Eresus_CMS::getLegacyKernel()->request['params'][0] != 'main')
        {
            array_unshift(Eresus_CMS::getLegacyKernel()->request['params'], 'main');
            $main_fake = true;
        }
        reset(Eresus_CMS::getLegacyKernel()->request['params']);
        $item['id'] = 0;
        $url = '';
        do
        {
            $items = Eresus_CMS::getLegacyKernel()->sections->children($item['id'],
                Eresus_CMS::getLegacyKernel()->user['auth'] ?
                    Eresus_CMS::getLegacyKernel()->user['access'] : GUEST, SECTIONS_ACTIVE);
            $item = false;
            for ($i=0; $i<count($items); $i++)
            {
                if ($items[$i]['name'] == current(Eresus_CMS::getLegacyKernel()->request['params']))
                {
                    $result = $item = $items[$i];
                    if ($item['id'] != 1 || !$main_fake)
                    {
                        $url .= $item['name'].'/';
                    }
                    $event = new Eresus_Event_UrlSectionFound($item, $url);
                    Eresus_Kernel::app()->getEventDispatcher()
                        ->dispatch('cms.client.url_section_found', $event);
                    $this->section[] = $item['title'];
                    next(Eresus_CMS::getLegacyKernel()->request['params']);
                    array_shift(Eresus_CMS::getLegacyKernel()->request['params']);
                    break;
                }
            }
            if ($item && $item['id'] == 1 && $main_fake)
            {
                $item['id'] = 0;
            }
        }
        while ($item && current(Eresus_CMS::getLegacyKernel()->request['params']));
        Eresus_CMS::getLegacyKernel()->request['path'] =
        Eresus_CMS::getLegacyKernel()->request['path'] = Eresus_CMS::getLegacyKernel()->root . $url;
        if ($result)
        {
            $result = Eresus_CMS::getLegacyKernel()->sections->get($result['id']);
        }
        return $result;
    }
909851
public function update(PageRequest $request, Page $page)
    {
        try {
            $data = $request->all();

            $page->update($data);
            $message = trans('messages.success.updated', ['Module' => trans('page::page.name')]);
            $code    = 204;
            $status  = 'success';
            $url     = guard_url('page/page/' . $page->getRouteKey());
        } catch (Exception $e) {
            $message = $e->getMessage();
            $code    = 400;
            $status  = 'error';
            $url     = guard_url('page/page/' . $page->getRouteKey());
        }
        return compact('data', 'message', 'code', 'status', 'url');
    }
856662
public function create(PageRequest $request)
    {

        $page = $this->repository->newInstance([]);
        return $this->response->setMetaTitle(trans('app.new') . ' ' . trans('page::page.name')) 
            ->view('page::page.create', true) 
            ->data(compact('page'))
            ->output();
    }
480335
public function toResponse($request)
    {
        return (
            $this->resource instanceof AbstractPaginator
                ? new PaginatedResourceResponse($this)
                : new ResourceResponse($this)
        )->toResponse($request);
    }
360082
public function update(PageRequest $request, Page $page)
    {
        try {
            $attributes = $request->all();

            $page->update($attributes);
            return $this->response->message(trans('messages.success.updated', ['Module' => trans('page::page.name')]))
                ->code(204)
                ->status('success')
                ->url(guard_url('page/page/' . $page->getRouteKey()))
                ->redirect();
        } catch (Exception $e) {
            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('page/page/' . $page->getRouteKey()))
                ->redirect();
        }

    }
342103
public function indexAction(Request $request)
    {
        $manager = $this->get('compo_faq.manager.faq');

        $page = $request->get('page', 1);

        $pager = $manager->getPager([], $page);
        $totalPages = $pager->getPageCount();

        $seoPage = $this->get('sonata.seo.page');
        $seoPage->setContext('faq_list');
        $seoPage->addVar('page', $page);
        $seoPage->addVar('total_pages', $pager->getPageCount());

        if (1 !== $page) {
            $seoPage->setLinkCanonical($manager->getFaqIndexPermalink(['page' => $page], 0));
            $metas = $seoPage->getMetas();
            $metas['name']['robots'] = 'noindex, follow';
            $seoPage->setMetas($metas);
        } else {
            $seoPage->setLinkCanonical($manager->getFaqIndexPermalink([], 0));
        }

        if ($totalPages > 1 && $page < $totalPages) {
            $seoPage->setLinkNext($manager->getFaqIndexPermalink(['page' => $page + 1], 0));
        }

        if ($totalPages > 1 && $page > 1) {
            $seoPage->setLinkPrev($manager->getFaqIndexPermalink(['page' => $page - 1], 0));
        }

        $seoPage->build();

        return $this->render(
            'CompoFaqBundle:Faq:index.html.twig',
            [
                'pager' => $pager,
            ]
        );
    }
771467
public function executeAction(Request $request)
    {
        /**
         * @var FormInterface $form
         */
        $form = $this
            ->formFactory
            ->create('stripe_view');

        $form->handleRequest($request);
        $redirect = $this
            ->redirectionRoutes
            ->getRedirectionRoute('success');

        try {
            if (!$form->isValid()) {
                throw new PaymentException();
            }

            $data = $form->getData();
            $paymentMethod = $this->createStripeMethod($data);
            $this
                ->stripeManager
                ->processPayment($paymentMethod, $data['amount']);
        } catch (Exception $e) {

            /**
             * Must redirect to fail route.
             */
            $redirect = $this
                ->redirectionRoutes
                ->getRedirectionRoute('failure');
        }

        $redirectUrl = $this
            ->urlGenerator
            ->generate(
                $redirect->getRoute(),
                $redirect->getRouteAttributes(
                    $this->paymentBridge->getOrderId()
                )
            );

        return new RedirectResponse($redirectUrl);
    }
1026468
public function indexAction(Request $request)
    {
        if ($pager = $this->getPaginator()) {
            return $this->render('IntegratedChannelBundle:Config:index.html.twig', [
                'adapters' => $this->registry->getAdapters(),
                'pager' => $pager->paginate($this->manager->findAll(), $request->query->get('page', 1))
            ]);
        }

        throw new HttpException(500, 'Paginator service not found');
    }
919706
public function update(PageRequest $request, Page $page)
    {
        $this->repository->update($page, $request->all());
        return redirect()->route('admin.page.index');
    }
233824
public function showAction(ErrorPage $page)
    {
        //add the view to twig
        $this->container->get('twig')->addGlobal('view', $page);
        $page->setReference(new ViewReference($page->getId()));
        $parameters = [
            'view'   => $page,
            'id'     => $page->getId(),
            'locale' => $page->getCurrentLocale(),
        ];

        $this->get('victoire_widget_map.builder')->build($page);
        $this->get('victoire_widget_map.widget_data_warmer')->warm(
            $this->get('doctrine.orm.entity_manager'),
            $page
        );

        $this->container->get('victoire_core.current_view')->setCurrentView($page);

        //create the response
        $response = $this->container->get('templating')->renderResponse(
            'VictoireCoreBundle:Layout:'.$page->getTemplate()->getLayout().'.html.twig',
            $parameters
        );

        return $response;
    }
1317862
protected function clientRenderPages()
    {
        /** @var TClientUI $page */
        $page = Eresus_Kernel::app()->getPage();
        $result = $page->pages($this->pagesCount, $this->settings['itemsPerPage'],
            $this->table['sortDesc']);
        return $result;
    }
370185
public function getHtml(Eresus_CMS_Request $request)
    {
        $legacyKernel = Eresus_Kernel::app()->getLegacyKernel();
        $sections = $legacyKernel->sections;
        $args = $request->getMethod() == 'GET' ? $request->query : $request->request;
        $item = $sections->get($args->getInt('section'));
        $response = $args->has('update') // TODO Использовать getMethod вметос 'update'
            ? $this->updateAction($item)
            : $this->formAction($item, $args);
        return $response;
    }
119580
public function page(string $id, Request $request, SalesChannelContext $context): Response
    {
        if (!$id) {
            throw new MissingRequestParameterException('Parameter id missing');
        }

        $page = $this->load($id, $request, $context);

        return $this->renderStorefront('@Storefront/page/content/detail.html.twig', ['cmsPage' => $page]);
    }
459699
public function __HANDLER($page = null)
    {
        $parent = CMSNav::fullTree();
        $tree = new \samson\treeview\SamsonTree('tree/tree-template', 0, 'structure/addchildren');

        // Установим дерево ЭСС
        m()->view('index')
            ->title(t('Элементы структуры содержания сайта', true))
            ->set($tree->htmlTree($parent), 'tree');
    }
497854
@Override
    public Page<Entity> previousPage(final Page<Entity> page, 
                                     final TwilioRestClient client) {
        Request request = new Request(
            HttpMethod.GET,
            page.getPreviousPageUrl(
                Domains.AUTHY.toString(),
                client.getRegion()
            )
        );
        return pageForRequest(client, request);
    }
611695
public function update($id, PagesRequest $request)
    {
        $pages = $this->repository->find($id);

        if (empty($pages)) {
            Cms::notification('Page not found', 'warning');

            return redirect(route($this->routeBase.'.pages.index'));
        }

        $pages = $this->repository->update($pages, $request->all());
        Cms::notification('Page updated successfully.', 'success');

        if (!$pages) {
            Cms::notification('Page could not be saved.', 'warning');
        }

        return redirect(url()->previous());
    }