PHPackages                             alexandresalome/web-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. alexandresalome/web-bundle

Abandoned → [symfony/framework-bundle](/?search=symfony%2Fframework-bundle)ArchivedLibrary

alexandresalome/web-bundle
==========================

A bundle to make awesome web applications

v0.1.2(12y ago)103084[1 issues](https://github.com/alexandresalome/web-bundle/issues)MITPHPPHP &gt;=5.3.3

Since Sep 22Pushed 11y ago1 watchersCompare

[ Source](https://github.com/alexandresalome/web-bundle)[ Packagist](https://packagist.org/packages/alexandresalome/web-bundle)[ RSS](/packages/alexandresalome-web-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

\[DEPRECATED\] AlexWebBundle
============================

[](#deprecated-alexwebbundle)

I recommend you to pick snippets in the code, but not to use it actually (very unstable).

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

[](#installation)

Add **alexandresalome/web-bundle** to your **composer.json**:

```
{
    "require": {
        "alexandresalome/web-bundle": "dev-master"
    }
}
```

Updates your dependencies and add it to your **AppKernel**:

```
public function registerBundles()
{
    return array(
        // ...

        new Alex\WebBundle\AlexWebBundle()
    )
}
```

Base controller
---------------

[](#base-controller)

`Controller` from this bundle provides a bunch of useful methods.

Take a [look at the class](https://github.com/alexandresalome/web-bundle/blob/master/Controller/Controller.php)for an exhaustive feature list.

Data Fixtures
-------------

[](#data-fixtures)

```
namespace Acme\DemoBundle\DataFixtures\ORM;

use Alex\WebBundle\DataFixtures\ORMFixture;
use Doctrine\Common\Persistence\ObjectManager;

class UserData extends ORMFixture
{
    public function load(ObjectManager $manager)
    {
        // access a container service
        $this->get('security.encoder_factory');
    }
}
```

Form templating
---------------

[](#form-templating)

Twitter Bootstrap 3.0 templating is available in this bundle for forms. In Twig configuration, add form templating:

```
twig:
    form:
        resources: [ "AlexWebBundle::form_bootstrap3_layout.html.twig" ]
```

Locale listener
---------------

[](#locale-listener)

If you want to allow user to choose locale in a given set, you can turn on the locale listener by appending in your `config.yml` file:

```
alex_web:
    locale_listener: [ fr_FR, en_US, pt_PT ]
```

This configuration will constraint the user locale on one of those. Default behavior is to store this locale in session. If you don't want to use session but still want to use the listener:

```
alex_web:
    locale_listener:
        enabled: true
        locales: [fr_FR, en_US]
        session_key: null # disable persistence in session
```

### Twig extension

[](#twig-extension)

`|format_interval`

Example:

```
Duration: {{ job.finishedAt.diff(jobStartedAt) }} {# should be job.duration #}
```

This method will transform DateInterval object to a string representation.

### Pagination template

[](#pagination-template)

If you are using my [pagination library](http://github.com/alexandresalome/pagination), you might appreciate the template `AlexWebBundle::pagination.html.twig`. To use it:

```
{% embed "AlexWebBundle::pagination.html.twig" %}
    {% block colspan '3' %}
    {% block head %}
        Username
        Fullname
        Actions
    {% endblock %}
    {% block body %}
        {% for user in pager %}

                {# ... #}

        {% else %}
            no user
        {% endfor %}
    {% endblock %}
{% endembed %}
```

### Form extra widgets

[](#form-extra-widgets)

**Form sections**

Structure your form with sections. Sections will group fields with a legend above, so that your form is more structured:

```
$builder
    ->add($builder->create('informations' 'form_section')
        ->add('firstname', 'text')
        ->add('lastname', 'text')
    )
    ->add($builder->create('contacts', 'form_section')
        ->add('main', 'contact')
    )
```

**Form tabs**

Here is an example of a form with tabs:

```
$builder = $this->get('form.factory')->createBuilder('form_tabs');

$builder
    ->add($builder->create('informations', 'form_tab')
        ->add('firstname', 'text')
        ->add('lastname', 'text')
    )
    ->add($builder->create('contacts', 'form_tab')
        ->add('main', 'contact')
    )
;
```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~65 days

Total

3

Last Release

4481d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c6be58ec4620ddbcc6f95bf7353365dc7ff796c004c70369333aee6125eb309?d=identicon)[alexandresalome](/maintainers/alexandresalome)

---

Top Contributors

[![mickaelandrieu](https://avatars.githubusercontent.com/u/1247388?v=4)](https://github.com/mickaelandrieu "mickaelandrieu (2 commits)")

### Embed Badge

![Health badge](/badges/alexandresalome-web-bundle/health.svg)

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

###  Alternatives

[ed/blog-bundle

Symfony EDBlogBundle

348.4k](/packages/ed-blog-bundle)[ecentria/ecentria-rest-bundle

Goal of this bundle is to simplify process of creating APIs with Symfony. We use already well-coded libraries, combine them together to simplify process and not to re-invent the wheel. We've chose REST and HATEOS to have unified standards of API requests and responses.

142.4k](/packages/ecentria-ecentria-rest-bundle)

PHPackages © 2026

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