2017 © Pedro Peláez
 

symfony-bundle bootstrap-checkbox-bundle

image

itchaos/bootstrap-checkbox-bundle

  • Monday, October 24, 2016
  • by Eloar
  • Repository
  • 1 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Bootstrap Checkbox Bundle

This is just simple wrapping bundle for Bootstrap Checkbox., (*1)

Minimal Requirements

  • php 5.6
  • symfony 2.3
  • twig 1.0

Instalation

  1. Add to composer requirements
composer require itchaos/bootstrap-checkbox-bundle
  1. Register bundle in Your AppKernel
<?php
//..
public function registerBundles()
{
    $bundles = array(
        // ...
        new ITChaos\Bundle\BootstrapCheckboxBundle\BootstrapCheckboxBundle()
        // ...
    );
    return $bundles;
}
  1. Add bundle js resources to assetic
assetic:
    bundles:
        - BootstrapCheckboxBundle
  1. Add asset to your layout
{% javascripts
    '@BootstrapCheckboxBundle'
%}
<script type="text/javascript" src="{{ asset_url }}"></script>

Usage

Bundle provides you with new form type BootstrapCheckboxType which descends from regular Symfonys CheckboxType. It has same usage but is rendered next to label instead inside (as in most Bootstrap bundles). All properties for bootstrap checkbox from vsn4ik/bootstrap-checkbox are exposed by BootstrapCheckboxType as described in wrapped plugins documnetation available here: BootstrapCheckbox documentation, (*2)

The main difference is expanding parameter names containing cls to class., (*3)

The Versions