PHP code example of hamichen / zf2-twb-bundle
1. Go to this page and download the library: Download hamichen/zf2-twb-bundle 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/ */
hamichen / zf2-twb-bundle example snippets
return array(
'modules' => array(
// ...
'TwbBundle',
),
// ...
);
return array(
//...
'asset_bundle' => array(
'assets' => array(
'less' => array('@zfRootPath/vendor/twitter/bootstrap/less/bootstrap.less')
)
),
//...
);
//...
echo $this->headScript();
//...
$this->form(new \Zend\Form\Form());
$this->form(null,\TwbBundle\Form\View\Helper\TwbBundleForm::LAYOUT_INLINE)->openTag($oForm);
$this->formButton(new \Zend\Form\Element());
$this->formCheckbox(new \Zend\Form\Element\Checkbox('checkbox-input'));
$this->formCheckbox(new \Zend\Form\Element\Checkbox('checkbox-input',array(
'label' => 'Prepend label',
'label_options' => array('position' => \Zend\Form\View\Helper\FormRow::LABEL_PREPEND)
)));
$this->formCollection(new \Zend\Form\Element());
$this->formElement(new \Zend\Form\Element());
$this->formElementErrors(new \Zend\Form\Element());
$this->formMultiCheckbox(new \Zend\Form\Element\ElementInterface());
$this->formRadio(new \Zend\Form\Element\ElementInterface());
$this->formRow(new \Zend\Form\Element());
$this->formRow(new \Zend\Form\Element('my-element', array(
'label' => 'My <i>Label</i> :',
'label_options' => array('disable_html_escape' => true)
)));
$this->formStatic(new \Zend\Form\Element\ElementInterface());
$this->alert('alert message',array('class' => 'alert-success'));
$this->badge('badge message',array('class' => 'pull-right'));
$this->buttonGroup(array(new \Zend\Form\Element\Button('left', array('label' => 'Left'))),array('class' => 'pull-right'));
$this->glyphicon('star',array('class' => 'pull-right'));
$this->fontAwesome('star',array('class' => 'pull-right'));
$this->dropdown(array('Item #1',\TwbBundle\View\Helper\TwbBundleDropDown::TYPE_ITEM_DIVIDER,'Item #2'));
$this->label('label message',array('class' => 'label-primary'));
$this->label('label message',array('class' => 'label-primary','tagName' => 'a'));
$this->formStatic(new \TwbBundle\Form\Element\StaticElement());
bash
$ php composer.phar update