PHPackages                             sameddin/bootstrap-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. sameddin/bootstrap-bundle

Abandoned → [https://github.com/elnur/ElnurBootstrapBundle](/?search=https%3A%2F%2Fgithub.com%2Felnur%2FElnurBootstrapBundle)Symfony-bundle[Templating &amp; Views](/categories/templating)

sameddin/bootstrap-bundle
=========================

Unobtrusive support for Bootstrap 3

v0.1.3(11y ago)1012.1k3[1 PRs](https://github.com/elnur/ElnurBootstrapBundle/pulls)MITPHP

Since Feb 24Pushed 9y ago2 watchersCompare

[ Source](https://github.com/elnur/ElnurBootstrapBundle)[ Packagist](https://packagist.org/packages/sameddin/bootstrap-bundle)[ RSS](/packages/sameddin-bootstrap-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

ElnurBootstrapBundle
====================

[](#elnurbootstrapbundle)

This bundle provides unobtrusive support for Bootstrap 3. By “unobtrusive” I mean that it doesn't force some particular styling unless you explicitly tell it to. For example, by default, forms get the default Bootstrap layout — not horizontal or something else like that.

Installation
------------

[](#installation)

The bundle assumes that you install Bootstrap yourself by whatever means you like — be it a Composer package or via Bower.

To install the bundle itself, add the following to your `composer.json`:

```
{
    "require": {
        "elnur/bootstrap-bundle": "~0.1"
    }
}

```

And tell Composer to install the bundle:

```
$ php composer.phar update elnur/bootstrap-bundle

```

Then enable the bundle by adding the following to your `AppKernel.php`:

```
public function registerBundles()
{
    $bundles = array(
        // ...
        new Elnur\Bundle\BootstrapBundle\ElnurBootstrapBundle,
    );

    // ...
}

```

Forms
-----

[](#forms)

To render a form with the default Bootstrap layout, just do the following:

```
{{ form(form) }}

```

If you want to use another layout — say, horizontal — tell about that explicitly:

```
{{ form(form, {layout: 'horizontal'}) }}

```

Supported layouts are:

- default,
- `horizontal`,
- `inline`, and
- `navbar`.

Buttons
-------

[](#buttons)

### Context

[](#context)

To set a button's context, use the `context` option:

```
$builder->add('submit', 'submit', array(
    'context' => 'primary',
));

```

Bootstrap ships with the following contexts:

- `default`,
- `primary`,
- `success`,
- `info`,
- `warning`,
- `danger`, and
- `link`.

Input groups
------------

[](#input-groups)

To prepend or append textual addons to an input, use the `prepend` and `append` options, respectively:

```
$builder->add('price', 'integer', array(
    'prepend' => '$',
    'append' => '.00',
));

```

Converting Labels to Placeholders
---------------------------------

[](#converting-labels-to-placeholders)

If you want to convert labels to placeholders, set the `labels_to_placeholders` option to `true`:

```
{{ form(form, {labels_to_placeholders: true}) }}

```

Flash Messages
--------------

[](#flash-messages)

To render flash messages just add the following to your layout template:

```
{% include 'ElnurBootstrapBundle::flash.html.twig' %}

```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 92.9% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~53 days

Total

4

Last Release

4301d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/68813fbedabf08594b8ec7d70243d248b9e32efbe43e85621ec4ca5eb83e73ff?d=identicon)[sameddin](/maintainers/sameddin)

---

Top Contributors

[![elnur](https://avatars.githubusercontent.com/u/821060?v=4)](https://github.com/elnur "elnur (39 commits)")[![redstar504](https://avatars.githubusercontent.com/u/1311325?v=4)](https://github.com/redstar504 "redstar504 (3 commits)")

---

Tags

templatingbootstrap

### Embed Badge

![Health badge](/badges/sameddin-bootstrap-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/sameddin-bootstrap-bundle/health.svg)](https://phpackages.com/packages/sameddin-bootstrap-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[a2lix/auto-form-bundle

Automate form building

873.8M11](/packages/a2lix-auto-form-bundle)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[elnur/bootstrap-bundle

Unobtrusive support for Bootstrap 3

1014.1k](/packages/elnur-bootstrap-bundle)[netgen/layouts-core

Netgen Layouts enables you to build and manage complex web pages in a simpler way and with less coding. This is the core of Netgen Layouts, its heart and soul.

3689.4k10](/packages/netgen-layouts-core)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
