當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。