PHP code example of mwillbanks / zfc-twitter-bootstrap
1. Go to this page and download the library: Download mwillbanks/zfc-twitter-bootstrap library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mwillbanks / zfc-twitter-bootstrap example snippets
// render element by element
$form = $this->form;
$form->prepare();
echo $this->form()->openTag($form);
echo $this->ztbFormElement($this->form->get('element'));
echo $this->form()->closeTag();
echo $this->ztbAlert('This is an alert');
// additional parameters: block level and class
echo $this->ztbAlert('This is an alert', true, 'warning');
// explicit usage
// explicit types: info, error, success, warning
echo $this->ztbAlert()->warning('This is an alert');
// explicit additional parameters: block level
echo $this->ztbAlert()->warning('This is an alert');
echo $this->ztbBadge('This is a badge');
// additional parameters: class
echo $this->ztbBadge('This is a badge', 'info');
// explicit usage
// explicit types: info, important, inverse, success, warning
echo $this->ztbBadge()->info('This is a badge');
echo $this->ztbCloseIcon();
// or render an anchor
echo $this->ztbCloseIcon('a');
// controller/action
// other types Info, Success, Error
$this->flashMessenger()->addMessage(
'User could not be saved due to a database error.'
);
// other options
$this->flashMessenger()->addMessage(array(
'message' => 'User could not be saved due to a database error.',
'title' => 'Fatal Error!',
'titleTag' => 'h4',
'isBlock' => true,
);
// view script
// render all messages in all namespaces
echo $this->ztbFlashMessenger()->render();
// explicit usage
// explicit types: default, info, success, error
echo $this->ztbFlashMessenger('error');
// or
echo $this->ztbFlashMessenger()->render('info');
echo $this->ztbIcon('user');
// additional parameters: color
echo $this->ztbIcon('user', 'white');
// explicit usage
echo $this->ztbIcon()->user();
echo $this->ztbIcon()->user('white');
// icon names with dashes should be camel cased when using this method
echo $this->ztbIcon()->plusSign();
echo $this->ztbLabel('This is a label');
// additional parameters: class
echo $this->ztbLabel('This is a label', 'info');
// explicit usage
// explicit types: info, important, inverse, success, warning
echo $this->ztbLabel()->info('This is a label');
echo $this->ztbnavigation()->ztbmenu($navContainer);
echo $this->ztbnavigation()->ztbbreadcrumbs($navContainer);
Well Usage
-----------
echo $this->ztbWell('This is a well');
// additional parameters: class
echo $this->ztbWell('This is a large well', 'well-large');
// explicit usage
// explicit types: small, large
echo $this->ztbWell()->small('This is a small well');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.