Download the PHP package sebaks/view without Composer
On this page you can find all versions of the php package sebaks/view. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package view
View
ZF2 Module. Build template by config. Solution for reusing template blocks and code.
Introduction
In our conception view contains 3 parts:
- Layout (General view style for several URI)
- Contents (One page template - for display one URI)
- Blocks (Some functional piece of view - many blocks for one URI)
Each block
contain:
if exists key extend
- other key not required and will be inherited from parent view. Each key will be
merged with parent. You can describe some blocks one time and reuse it anywhere.
Block options
extend
- describe parent view, all config key will be inherited and merged with current configlayout
- define page layout name, it's can sense only forcontents
notblocks
(becauselayout
can sense for whole route\uri)template
- template name for current blockviewModel
- specific ViewModel for current block (it can hide complex view logic for current block)childrenDynamicLists
-data
- array for variables in view.data
can bedata['static']
anddata['fromGlobal']
.data['static']
- static variables, for example labels, icons, some text etc.data['fromGlobal']
- dynamic data, wich can be fetched by controller.
-
children
- desribe child blocks, which describe as block and will be acessed like property in template:in this case
table
andpaginator
will be render like child block.
Config must be in key sebaks-view
.
Each key in contents
- route name.
Example config
Somewhere in your module.config.php
All versions of view with dependencies
zendframework/zend-eventmanager Version <2.6 >=2.4
zendframework/zend-modulemanager Version <2.6 >=2.4
zendframework/zend-servicemanager Version <2.6 >=2.4
zendframework/zend-mvc Version <2.6 >=2.4
zendframework/zend-http Version <2.6 >=2.4
zendframework/zend-view Version <2.6 >=2.4