Twitter Bootstrap module for Zend Framework used by Internalsystemerror Limited
This module intends to integrate Twitter Bootstrap with Zend Framework 2 and offers general view helpers, navigation view helpers and form view helpers.
Installation of this module uses composer.
php composer.phar require ise/ise-module-bootstrap
Then add the following modules into your Zend Framework configuration.
The following form view helpers are registered by default, which override those provided by Zend Framework, and can be used in their place. All elements will have the appropriate bootstrap style classes added to them.
An entire form can easily be rendered as follows:
/** * Where $form implements Zend\Form\FormInterface */ echo $this->form($form);
The bootstrap CSS/JS and meta tags are added by usage of a DispatchListener. The following view helpers are registered by default.
Note: The Time plugin uses jQuery Timeago to display time as "2 minutes ago" for instance.
The following navigation view helpers are registered by default.
You can use the navbar helper as follows:
/** * Where $container is a valid navigation container name, such as * 'default_navigation', if using the default ZF2 navigation factory. * * To have some of the links floated to the right (a login button for instance), * you can pass in the 'rightMenu' option to point to another navigation * container instance. */ echo $this->navigation($container)->navbar()->render(null, [ 'brand' => [ 'label' => 'Your Brand Name Here', 'route' => 'home', 'icon' => 'th-large', // Or any other icon name that would be prefixed glyphicon-* ], 'inverse' => true, 'fixed' => 'top', 'rightMenu' => $anotherContainer, ]);