Questions tagged [zend-view]

provides the “View” layer of Zend Framework 2’s MVC system. It is a multi-tiered system allowing a variety of mechanisms for extension, substitution, and more.

The components of the view layer are as follows:

  • Variables Containers hold variables and callbacks that you wish to represent in the view. Often-times, a Variables Container will also provide mechanisms for context-specific escaping of variables and more.
  • View Models hold Variables Containers, specify the template to use (if any), and optionally provide rendering options (more on that below). View Models may be nested in order to represent complex structures.
  • Renderers take View Models and provide a representation of them to return. Zend Framework 2 ships with three renderers by default: a PhpRenderer which utilizes PHP templates in order to generate markup, a JsonRenderer, and a FeedRenderer for generating RSS and Atom feeds.
  • Resolvers utilizes Resolver Strategies to resolve a template name to a resource a Renderer may consume. As an example, a Resolver may take the name “blog/entry” and resolve it to a PHP view script.
  • The View consists of strategies that map the current Request to a Renderer, and strategies for injecting the result of rendering to the Response.
  • Rendering Strategies listen to the “renderer” event of the View and decide which Renderer should be selected based on the Request or other criteria.
  • Response Strategies are used to inject the Response object with the results of rendering. That may also include taking actions such as setting Content-Type headers.
290 questions
-1
votes
1 answer

zf2 using view standalone

I am trying to use the \Zend\View components for page and form rendering, without the full framework stack. Using composer, i have installed zendframework\zend-view 2.6 After some research, i have found the following code examples to use views…
John Crest
  • 201
  • 1
  • 4
  • 24
-1
votes
1 answer

setvariable in module.php needed in controller

I have set the variable in module.php which i can get in the layout. now i want this variable in my controller also. public function onBootstrap(MvcEvent $e) { $eventManager = $e->getApplication()->getEventManager(); $moduleRouteListener =…
user3157253
  • 83
  • 1
  • 6
-1
votes
2 answers

Is Zend_View_Helper_Cycle efficient?

I am creating a table with zebra style in my view:- $sr_no = 1; if($sr_no % 2 == 0){ $style = 'class="even-row"'; }else{ $style = 'class="odd-row"'; } > $sr_no++; Zend Framework provides…
Edward Maya
  • 429
  • 2
  • 10
  • 25
-1
votes
1 answer

Rendering a form with a view helper

I have a homepage which I want a registration form on, to do this I am using Zend_View_Helper. However nothing is happening.. I cant see the form I am trying to get on that page. Here's the helper 'Register.php':
Rik89
  • 157
  • 4
  • 22
-4
votes
1 answer

What's the url being produced here

I'm getting a Route error from this line. Can someone tell me what's the final form of the url being built here: $this->url(array('locate'=>'rom'), 'locate', true);
sameold
  • 18,400
  • 21
  • 63
  • 87
1 2 3
19
20