当前位置: 首页>>代码示例>>PHP>>正文


PHP Controller::render方法代码示例

本文整理汇总了PHP中Symfony\Bundle\FrameworkBundle\Controller\Controller::render方法的典型用法代码示例。如果您正苦于以下问题:PHP Controller::render方法的具体用法?PHP Controller::render怎么用?PHP Controller::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Bundle\FrameworkBundle\Controller\Controller的用法示例。


在下文中一共展示了Controller::render方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: render

 /**
  * {@inheritdoc}
  */
 public function render($view, array $parameters = array(), Response $response = null)
 {
     $parameters['admin'] = isset($parameters['admin']) ? $parameters['admin'] : $this->admin;
     $parameters['base_template'] = isset($parameters['base_template']) ? $parameters['base_template'] : $this->getBaseTemplate();
     $parameters['admin_pool'] = $this->get('sonata.admin.pool');
     return parent::render($view, $parameters, $response);
 }
开发者ID:robhunt3r,项目名称:SonataAdminBundle,代码行数:10,代码来源:CRUDController.php

示例2: render

 /**
  * {@inheritdoc}
  */
 protected function render($view, array $parameters = [], Response $response = null)
 {
     $pool = $this->get('sonata.admin.pool');
     $parameters['admin_pool'] = isset($parameters['admin_pool']) ? $parameters['admin_pool'] : $pool;
     $parameters['base_template'] = 'YnloAdminBundle::standard_layout.html.twig';
     return parent::render($view, $parameters, $response);
 }
开发者ID:ynloultratech,项目名称:framework,代码行数:10,代码来源:StandaloneAdminController.php

示例3: render

 public function render($view, array $parameters = array(), Response $response = null)
 {
     if ($this->get('templating')->exists(self::BUNDLE_MAXIMCMS . ':' . $view)) {
         return parent::render(self::BUNDLE_MAXIMCMS . ':' . $view, $parameters);
     } else {
         return parent::render($this->bundle . ':' . $view, $parameters);
     }
 }
开发者ID:c4d3r,项目名称:mcsuite-application-eyeofender,代码行数:8,代码来源:ModuleController.php

示例4: render

 public function render($template, array $data = array(), Response $response = null)
 {
     $lastTale = $this->getDoctrine()->getManager()->getRepository('AppBundle:Tale')->findLastPublicTale();
     $bestTale = $this->getDoctrine()->getManager()->getRepository('AppBundle:Tale')->findByLikesDesc();
     $correctTale = $this->getDoctrine()->getManager()->getRepository('AppBundle:Tale')->findByScoreDesc();
     $commonData = array('bestTale' => $bestTale, 'lastTale' => $lastTale[0], 'correctTale' => $correctTale[0]);
     return parent::render($template, $data + $commonData, $response);
 }
开发者ID:MonicaCiuchetti,项目名称:ProgettoOpenness,代码行数:8,代码来源:BaseController.php

示例5: render

 public function render($view, array $parameters = array(), Response $response = null)
 {
     if (array_key_exists("pageTitle", $parameters)) {
         $this->twigParams = $parameters['pageTile'] . " | " . $this->twigParams['pageTitle'];
         unset($parameters['pageTitle']);
     }
     $this->twigParams = array_merge($this->twigParams, $parameters);
     return parent::render($view, $this->twigParams, $response);
 }
开发者ID:RLC85,项目名称:compBundle,代码行数:9,代码来源:WebsiteController.php

示例6: render

 public function render($view, array $parameters = array(), Response $response = null)
 {
     if (isset($this->options['viewPrefix'])) {
         $view = $this->options['viewPrefix'] . $view;
     }
     if (isset($this->options['viewSuffix'])) {
         $view = $view . $this->options['viewSuffix'];
     }
     return parent::render($view, $parameters, $response);
 }
开发者ID:xsolve-pl,项目名称:xs-newsletter,代码行数:10,代码来源:BaseController.php

示例7: render

 /**
  * {@inheritdoc}
  */
 public function render($view, array $parameters = array(), Response $response = null)
 {
     if (!$this->isXmlHttpRequest()) {
         $parameters['breadcrumbs_builder'] = $this->get('sonata.admin.breadcrumbs_builder');
     }
     $parameters['admin'] = isset($parameters['admin']) ? $parameters['admin'] : $this->admin;
     $parameters['base_template'] = isset($parameters['base_template']) ? $parameters['base_template'] : $this->getBaseTemplate();
     $parameters['admin_pool'] = $this->get('sonata.admin.pool');
     return parent::render($view, $parameters, $response);
 }
开发者ID:ejkun,项目名称:SonataAdminBundle,代码行数:13,代码来源:CRUDController.php

示例8: onController

 public function onController(Controller $controller, Request $request)
 {
     $repos = $this->admin->getRepository();
     $dql = $this->admin->getListDQL();
     $em = $this->admin->getManager();
     $query = $em->createQuery($dql);
     $paginator = $this->admin->getService('knp_paginator');
     $pagination = $paginator->paginate($query, $this->page_number, 10, array('pageParameterName' => 'admin_list_page'));
     return $controller->render($this->template, array('sf_admin_loader' => $controller->get('sf.admin.loader'), 'admin' => $this->admin, 'action' => $this, 'pagination' => $pagination));
 }
开发者ID:symforce,项目名称:symforce-admin,代码行数:10,代码来源:ListActionCache.php

示例9: onController

 public function onController(Controller $controller, Request $request)
 {
     $object = $this->admin->getRouteObject();
     $label = null;
     if ($this->admin->tree && $this->admin->getTreeObjectId()) {
         $label = $this->admin->trans('sf.tree.create.title', array('%object%' => $this->admin->string($this->admin->getTreeObject()), '%admin%' => $this->admin->getLabel()), $this->sf_domain);
     } else {
         $label = $this->admin->getFormLabel();
     }
     return $controller->render($this->template, array('sf_admin_loader' => $controller->get('sf.admin.loader'), 'admin' => $this->admin, 'action' => $this, 'object' => $object, 'title' => $label));
 }
开发者ID:symforce,项目名称:symforce-admin,代码行数:11,代码来源:ViewActionCache.php

示例10: render

 /**
  * Renders a view with an handled Reponse
  * @see \Symfony\Bundle\FrameworkBundle\Controller\Controller::render()
  */
 public function render($view, array $parameters = array(), Response $response = null)
 {
     $response = parent::render($view, $parameters, $response);
     // get current request via the request_stack service
     $currentRequest = null;
     if ($this->requestStack instanceof RequestStack) {
         $currentRequest = $this->requestStack->getCurrentRequest();
     }
     foreach ($this->responseHandlers as $responseHandler) {
         if ($currentRequest !== null) {
             // give the current request to each response handler
             $responseHandler->setCurrentRequest($currentRequest);
         }
         $response = $responseHandler->handleResponse($response);
     }
     return $response;
 }
开发者ID:kmelia,项目名称:fresh-symfony,代码行数:21,代码来源:AbstractKmeliaController.php

示例11: render

 public function render($view, array $parameters = array(), Response $response = null)
 {
     if (!array_key_exists('project', $parameters)) {
         $parameters['project'] = $this->project;
     }
     return parent::render($view, $parameters, $response);
 }
开发者ID:koalamon,项目名称:koalamonframeworkbundle,代码行数:7,代码来源:ProjectAwareController.php

示例12: render

 /**
  * {@inheritdoc}
  */
 public function render($view, array $parameters = array(), Response $response = null)
 {
     return parent::render($this->getViewPrefix() . $view, $parameters, $response);
 }
开发者ID:mikoweb,项目名称:vsymfo-core,代码行数:7,代码来源:Controller.php

示例13: render

 /**
  * Renders a view.
  *
  * @param string   $view       The view name
  * @param array    $parameters An array of parameters to pass to the view
  * @param Response $response   A response instance
  *
  * @return Response A Response instance
  */
 public function render($view, array $parameters = [], Response $response = null)
 {
     $parameters = array_merge($this->viewParameters, $parameters);
     return parent::render($view, $parameters, $response);
 }
开发者ID:freedog96150,项目名称:puphpet,代码行数:14,代码来源:ControllerAbstract.php

示例14: render

 /**
  * Overridding the default render function to include the customer list with each page.
  *
  * @param string   $view
  * @param array    $params
  * @param Response $response
  *
  * @return Response
  */
 public function render($view, array $params = array(), Response $response = NULL)
 {
     $aircraftHelper = $this->get('group3_a.aircrew_helper');
     $params['aircrews'] = $aircraftHelper->getAllAircrews();
     $params['active'] = @$params['active'] ?: 0;
     return parent::render($view, $params, $response);
 }
开发者ID:troussos,项目名称:IT490,代码行数:16,代码来源:AircrewController.php

示例15: render

 public function render($view, array $parameters = array(), Response $response = null)
 {
     return parent::render($view, $parameters, $response);
 }
开发者ID:symfony,项目名称:symfony,代码行数:4,代码来源:ControllerTest.php


注:本文中的Symfony\Bundle\FrameworkBundle\Controller\Controller::render方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。