Download the PHP package eth8505/zend-mvc-themer without Composer
On this page you can find all versions of the php package eth8505/zend-mvc-themer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download eth8505/zend-mvc-themer
More information about eth8505/zend-mvc-themer
Files in eth8505/zend-mvc-themer
Package zend-mvc-themer
Short Description Module to add theming support for zend-mvc apps
License MIT
Informations about the package zend-mvc-themer
Eth8505\ZendMvcThemer - Module for Theming Zend\Mvc apps
!!!IMPORTANT!!! This package is no longer maintained, as Zendframework was renamed to laminas. Please use eth85055/laminas-mvc-themer instead.
The Eth8585\ZendMvcThemer moduole adds theming support to Zend\Mvc apps.
How to install
Install eth8505/zend-mvc-themer
package via composer.
$ composer require eth8505/zend-mvc-themer
Load the module in your application.config.php
file like so:
</h1>
<h2><?= $this->theme()->var('heading2/key1') ?></h2>
</body>
</html>
1.4 Specifying custom meta tags
Meta tags are a little more complicated than scripts, styles or variables, as there are two basic types, name
and
http-equiv
. With this module, we use the same basic-syntax for both of them, specifying the type
as a key in the
definition array.
To implement custom meta tags, implement get getMetaTags
method in your theme.
2. Register with service manager
You can either register your themes with the service manager via the config in your module.config.php
:
3. Resolving themes
Per default, theme resolving is done using the ConfigResolver
class, that simply checks the config
zend-mvc-themer/resolver
config, and injects the theme as the theme
service.
3.1 Custom theme resolvers
In addition to the default config-based theme resolver, you can also specify a custom resolver class. This can be any
implementation of ThemeResolverInterface
of your choosing, reading the theme from the session (if you want to provide
a selection of themes to your users).
Example implementation of a simple hostname-based theme resolver:
All versions of zend-mvc-themer with dependencies
zendframework/zend-mvc Version ^3.0
zendframework/zend-servicemanager Version ^3.0
zendframework/zend-stdlib Version ^3.0