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


PHP ViewModel::setTerminal方法代码示例

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


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

示例1: indexAction

 /**
  * Displays web configuration form
  *
  * @return array|ViewModel
  */
 public function indexAction()
 {
     $setupInfo = new SetupInfo($_SERVER);
     $view = new ViewModel(['autoBaseUrl' => $setupInfo->getProjectUrl(), 'autoAdminPath' => $setupInfo->getProjectAdminPath()]);
     $view->setTerminal(true);
     return $view;
 }
开发者ID:whoople,项目名称:magento2-testing,代码行数:12,代码来源:WebConfiguration.php

示例2: indexAction

 public function indexAction()
 {
     $viewModel = new ViewModel();
     // Disable Layout
     $viewModel->setTerminal(true);
     return $viewModel;
 }
开发者ID:ppLuiGui,项目名称:director-dashboard,代码行数:7,代码来源:IndexController.php

示例3: viewAction

 public function viewAction()
 {
     $id = (string) $this->params()->fromRoute('id', 0);
     $viewModel = new ViewModel(array('session' => $this->getService()->getById($id)));
     $viewModel->setTerminal(true);
     return $viewModel;
 }
开发者ID:uthando-cms,项目名称:uthando-session-manager,代码行数:7,代码来源:SessionManagerController.php

示例4: __construct

 /**
  * Constructor
  *
  * @param Site $currentSite  Current Site
  * @param PageRepo $pageRepo Page Repository
  */
 public function __construct(Site $currentSite, PageRepo $pageRepo)
 {
     $this->currentSite = $currentSite;
     $this->pageRepo = $pageRepo;
     $this->view = new ViewModel();
     $this->view->setTerminal(true);
 }
开发者ID:reliv,项目名称:rcm-admin,代码行数:13,代码来源:PageController.php

示例5: onDispatch

 /**
  * @see \AssetsBundle\Mvc\Controller\AbstractActionController::onDispatch()
  * @param \Zend\Mvc\MvcEvent $oEvent
  * @return mixed
  */
 public function onDispatch(\Zend\Mvc\MvcEvent $oEvent)
 {
     $this->view = $this->acceptableViewModelSelector($this->acceptCriteria);
     $oRequest = $oEvent->getRequest();
     if (!$oRequest instanceof \Zend\Http\Request || $oRequest->isXmlHttpRequest()) {
         $this->view->setTerminal(true);
     }
     return parent::onDispatch($oEvent);
 }
开发者ID:zf2-boiler-app,项目名称:app-display,代码行数:14,代码来源:AbstractActionController.php

示例6: xmlAction

 public function xmlAction()
 {
     $this->getResponse()->getHeaders()->addHeaderLine('Content-Type', 'text/xml');
     $viewModel = new ViewModel();
     $viewModel->setTerminal(true);
     return $viewModel;
 }
开发者ID:Tony133,项目名称:zf-web,代码行数:7,代码来源:IndexController.php

示例7: progressAction

 /**
  * @return array|ViewModel
  */
 public function progressAction()
 {
     $view = new ViewModel();
     $view->setTemplate('/magento/setup/readiness-check/progress.phtml');
     $view->setTerminal(true);
     return $view;
 }
开发者ID:kidaa30,项目名称:magento2-platformsh,代码行数:10,代码来源:ReadinessCheckInstaller.php

示例8: testAction

 /**
  * @WFD\WorkflowDispatch(enabled=true, activity="initialize")
  * @WFD\PrepareData(type="method", handler="prepareWorkflowDataHandler", enabled=true)
  * @WFD\DispatchConditions(
  *     conditions={
  *         @WFD\Condition(type="method", handler="testCondition")
  *     }
  * )
  * @WFD\RunWorkflowParamFromRoute(
  *     managerName="workflowManagerNameRouteParam",
  *     actionName="workflowActionNameRouteParam",
  *     name="workflowNameRouteParam"
  * )
  *
  */
 public function testAction()
 {
     $this->getEvent()->getParam(Dispatcher::WORKFLOW_DISPATCH_EVENT);
     $viewModel = new ViewModel();
     $viewModel->setTerminal(true);
     return $viewModel;
 }
开发者ID:old-town,项目名称:workflow-zf2-dispatch,代码行数:22,代码来源:TestController.php

示例9: indexAction

 /**
  * @return ViewModel
  */
 public function indexAction()
 {
     $this->maintenanceMode->set(false);
     $view = new ViewModel();
     $view->setTerminal(true);
     return $view;
 }
开发者ID:andrewhowdencom,项目名称:m2onk8s,代码行数:10,代码来源:UpdaterSuccess.php

示例10: serviceJsonAction

 public function serviceJsonAction()
 {
     // your code here ...
     $ViewModel = new ViewModel(array('data' => array('firstParam' => 'Value1', 'secondParam' => 'Value2')));
     $ViewModel->setTerminal(true);
     return $ViewModel;
 }
开发者ID:houzoumi,项目名称:fmi,代码行数:7,代码来源:IndexController.php

示例11: appAction

 public function appAction()
 {
     $viewModel = new ViewModel();
     $viewModel->setTemplate('zf-apigility-ui');
     $viewModel->setTerminal(true);
     return $viewModel;
 }
开发者ID:erik-maas,项目名称:zf-apigility-admin,代码行数:7,代码来源:AppController.php

示例12: validacaoAction

 public function validacaoAction()
 {
     $em = $this->getServiceLocator()->get("Doctrine\\ORM\\EntityManager");
     $dados = $em->getRepository("Usuario\\Entity\\UsuarioListas")->findOneBy(array("validacao" => 1));
     $quantPLista = 2;
     if ($dados) {
         $totalNumeros = count($dados->getListaTelefones()) - 1;
         foreach ($dados->getListaTelefones() as $key => $item) {
             if ($item->getValido() == 0) {
                 //Processo de validação
             } else {
                 if ($item->getValido() == 1) {
                     // Numero valido
                 } else {
                     if ($item->getValido() == 2) {
                         // invalido
                     }
                 }
             }
         }
     }
     die;
     $view = new ViewModel();
     $view->setTerminal(true);
     return $view;
 }
开发者ID:abazad,项目名称:whatsappMarketing,代码行数:26,代码来源:EnvioController.php

示例13: indexAction

 /**
  * Index page
  */
 public function indexAction()
 {
     $this->getResponse()->getHeaders()->addHeaders(['Content-type' => 'text/plain']);
     $view = new ViewModel();
     $view->setTerminal(true);
     return $view;
 }
开发者ID:esase,项目名称:dream-cms,代码行数:10,代码来源:PageRobotController.php

示例14: testAction

 public function testAction()
 {
     $id = $this->params()->fromRoute('id', 1);
     if (!$id) {
         $this->getResponse()->setStatusCode(404);
         return;
     }
     $entityManager = $this->getServiceLocator()->get('doctrine.entitymanager.orm_default');
     //$myObject = new Hgroups;
     $form = $this->getForm($this->getMyObject(), $entityManager, 'Добавить');
     $form->bind($this->getMyObject());
     $request = $this->getRequest();
     $viewmodel = new ViewModel();
     //disable layout if request by Ajax
     $viewmodel->setTerminal($request->isXmlHttpRequest());
     $is_xmlhttprequest = 1;
     if (!$request->isXmlHttpRequest()) {
         //if NOT using Ajax
         $is_xmlhttprequest = 0;
         if ($request->isPost()) {
             $form->setData($request->getPost());
             if ($form->isValid()) {
                 //save to db <span class="wp-smiley wp-emoji wp-emoji-wink" title=";)">;)</span>
                 $this->getMyObject()->setParentid($entityManager->getReference($this->getMyEntity(), $id));
                 $entityManager->persist($this->getMyObject());
                 $entityManager->flush();
             }
         }
     }
     $viewmodel->setVariables(array('form' => $form, 'is_xmlhttprequest' => $is_xmlhttprequest));
     return $viewmodel;
 }
开发者ID:sudar69,项目名称:hermes,代码行数:32,代码来源:DemoController.php

示例15: nolayout

 public function nolayout()
 {
     // Turn off the layout, i.e. only render the view script.
     $viewModel = new ViewModel();
     $viewModel->setTerminal(true);
     return $viewModel;
 }
开发者ID:juggernautsei,项目名称:openemr,代码行数:7,代码来源:InstallerController.php


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