本文整理汇总了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;
}
示例2: indexAction
public function indexAction()
{
$viewModel = new ViewModel();
// Disable Layout
$viewModel->setTerminal(true);
return $viewModel;
}
示例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;
}
示例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);
}
示例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);
}
示例6: xmlAction
public function xmlAction()
{
$this->getResponse()->getHeaders()->addHeaderLine('Content-Type', 'text/xml');
$viewModel = new ViewModel();
$viewModel->setTerminal(true);
return $viewModel;
}
示例7: progressAction
/**
* @return array|ViewModel
*/
public function progressAction()
{
$view = new ViewModel();
$view->setTemplate('/magento/setup/readiness-check/progress.phtml');
$view->setTerminal(true);
return $view;
}
示例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;
}
示例9: indexAction
/**
* @return ViewModel
*/
public function indexAction()
{
$this->maintenanceMode->set(false);
$view = new ViewModel();
$view->setTerminal(true);
return $view;
}
示例10: serviceJsonAction
public function serviceJsonAction()
{
// your code here ...
$ViewModel = new ViewModel(array('data' => array('firstParam' => 'Value1', 'secondParam' => 'Value2')));
$ViewModel->setTerminal(true);
return $ViewModel;
}
示例11: appAction
public function appAction()
{
$viewModel = new ViewModel();
$viewModel->setTemplate('zf-apigility-ui');
$viewModel->setTerminal(true);
return $viewModel;
}
示例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;
}
示例13: indexAction
/**
* Index page
*/
public function indexAction()
{
$this->getResponse()->getHeaders()->addHeaders(['Content-type' => 'text/plain']);
$view = new ViewModel();
$view->setTerminal(true);
return $view;
}
示例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;
}
示例15: nolayout
public function nolayout()
{
// Turn off the layout, i.e. only render the view script.
$viewModel = new ViewModel();
$viewModel->setTerminal(true);
return $viewModel;
}