PHPackages                             libre-informatique/decorator-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. libre-informatique/decorator-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

libre-informatique/decorator-bundle
===================================

This is the basis of a GUI for Libre Informatique Symfony2 projects

0.6.4(8y ago)02.1k2GPL-3.0CSSPHP &gt;=7.1

Since Feb 15Pushed 8y ago5 watchersCompare

[ Source](https://github.com/libre-informatique/DecoratorBundle)[ Packagist](https://packagist.org/packages/libre-informatique/decorator-bundle)[ Docs](https://github.com/libre-informatique/SymfonyBlastCoreBundle)[ RSS](/packages/libre-informatique-decorator-bundle/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (6)Versions (12)Used By (2)

SymfonyLibrinfoDecoratorBundle
==============================

[](#symfonylibrinfodecoratorbundle)

[![Build Status](https://camo.githubusercontent.com/bc8d129b22bd2bb5c0cbb04208909d7c8e75168340a217d00b8b167d00d9f5f9/68747470733a2f2f7472617669732d63692e6f72672f6c696272652d696e666f726d6174697175652f4465636f7261746f7242756e646c652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/libre-informatique/DecoratorBundle)[![Coverage Status](https://camo.githubusercontent.com/ad88059dad575932154f332f867dd6bf85b8381b55d692109c31b2d130f647b4/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6c696272652d696e666f726d6174697175652f4465636f7261746f7242756e646c652f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/libre-informatique/DecoratorBundle?branch=master)[![License](https://camo.githubusercontent.com/8ef95c388ebec13d4294750364b43e505c9644fe8269b517ff177eff23a05826/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c696272652d696e666f726d6174697175652f4465636f7261746f7242756e646c652e7376673f7374796c653d666c61742d737175617265)](./LICENCE.md)

[![Latest Stable Version](https://camo.githubusercontent.com/c208fe350363d6ac6265fafedf4ed6073ff2bee0ba0d69625790cefd0a6a5283/68747470733a2f2f706f7365722e707567782e6f72672f6c696272652d696e666f726d6174697175652f6465636f7261746f722d62756e646c652f762f737461626c65)](https://packagist.org/packages/libre-informatique/decorator-bundle)[![Latest Unstable Version](https://camo.githubusercontent.com/49c1ce5895547a36565f1385bd7bfb20a2dbd389299333f0ca8db6e9b8b44b27/68747470733a2f2f706f7365722e707567782e6f72672f6c696272652d696e666f726d6174697175652f6465636f7261746f722d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/libre-informatique/decorator-bundle)[![Total Downloads](https://camo.githubusercontent.com/a57a5c346f3510d0ac9b636eb235a2a7de1e65d9ef8c0dfc900ad1239e9d6b83/68747470733a2f2f706f7365722e707567782e6f72672f6c696272652d696e666f726d6174697175652f6465636f7261746f722d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/libre-informatique/decorator-bundle)

A basic decorator for various projects

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

[](#installation)

### Prerequiresites

[](#prerequiresites)

having a working Symfony2 environment

- having created a working Symfony2 app (including your DB and your DB link)
- having composer installed (here in /usr/local/bin/composer, having /usr/local/bin in your path)

Optional:

- having libre-informatique/core-bundle installed, or if not, follow the README instructions of the Core bundle

### Downloading

[](#downloading)

From your project root directory:

`$ composer require libre-informatique/crm-bundle dev-master`

### The Sonata bundles

[](#the-sonata-bundles)

Do not forget to configure the SonataAdminBundle. Find examples in the [libre-informatique/crm-bundle](https://github.com/libre-informatique/SymfonyLibrinfoCRMBundle#the-sonata-bundles) documentation.

### The Libre Informatique bundles

[](#the-libre-informatique-bundles)

Do not forget to configure the BlastCoreBundle. Find examples in the [libre-informatique/core-bundle](https://github.com/libre-informatique/SymfonyLibrinfoCRMBundle#the-libre-informatique-bundles) documentation.

### Finish

[](#finish)

Consider `LibrinfoDecoratorBundle` an assetic bundle :

```
# app/config/config.yml
# ...
assetic:
    bundles:
        # ...
        - LibrinfoDecoratorBundle
# ...

```

Publish the assets :

`$ app/console assets:install --symlink`

The goal of this bundle
-----------------------

[](#the-goal-of-this-bundle)

This bundle aims to ease the personnalization, in a reusable and scalable way, of your projects, giving something like a framework, once for all of them.

It works as a man-in-the-middle technology that overloads the default configuration, without stealing the right, for a project, to precise it again. By the way, this bundle reduces the size of the global configuration of a project.

Improving the LibrinfoDecoratorBundle
-------------------------------------

[](#improving-the-librinfodecoratorbundle)

The basics is to be able to extend in a very smoothy way the SonataAdminBundle, replacing its default parameters in a single YAML file named `Resources/config/decorator.yml`, and using the Twig philosophy of inheritance and blocks.

### decorator.yml

[](#decoratoryml)

```
# Resources/config/decorator.yml
parameters:
    librinfo_decorator:
        templates:
            layout:
                original: [SonataAdminBundle::standard_layout.html.twig, BlastCoreBundle::standard_layout.html.twig]
                modified: LibrinfoDecoratorBundle::layout.html.twig

```

You have noticed the root of this bundle's parameters : `librinfo_decorator`. Then if you need to replace generically some templates, you'll need to configure which default configuration you want to replace, to avoid overloading the project direct configuration.

So, you'll have to specify the Sonata key (from `sonata_admin` root element in your `app/config/config.yml`, see [the Sonata documentation](https://sonata-project.org/bundles/admin/2-3/doc/reference/configuration.html)) and two sub-keys :

- `original`: an array of which values you allow LibrinfoDecoratorBundle to erase
- `modified`: the value which will replace what you wrote in the `original` sub-key

### The templates

[](#the-templates)

Once you've replaced some of the default configuration templates by new ones you'll be able, if the new ones are located within the LibrinfoDecoratorBundle, to define them in the `Resources/views/` directory. There you'll use the Twig directives of `extends`, `{{ parent() }}`, `{% block xxx %}` to be more efficient.

e.g.:

```
{# Resources/views/layout.html.twig #}
{#

This file is part of the Libre Informatique CoreBundle package.

(c) Baptiste SIMON
(c) Gildas LE MOAL
(c) Libre Informatique [http://www.libre-informatique.fr/]

For the full copyright and license information, please view the LICENSE
file that was distributed with this source code.

#}

{% extends 'BlastCoreBundle::standard_layout.html.twig' %}

{% block body_attributes %}

class="sonata-bc skin-blue fixed"

{% endblock %}

{% block side_bar_after_nav %}

{% endblock %}

{% block sonata_top_nav_menu %}

                {% include admin_pool.getTemplate('user_block') %}

{% endblock %}

{% block logo %}
    {% spaceless %}

        {% if 'single_image' == admin_pool.getOption('title_mode') or 'both' == admin_pool.getOption('title_mode') %}
            {% if 'bundles/sonataadmin/logo_title.png' == admin_pool.titlelogo %}

            {% else %}

            {% endif %}
        {% endif %}
        {% if 'single_text' == admin_pool.getOption('title_mode') or 'both' == admin_pool.getOption('title_mode') %}
            {% if 'Sonata Admin' == admin_pool.title %}
            Libre Informatique
            {% else %}
            {{ admin_pool.title }}
            {% endif %}
        {% endif %}

    {% endspaceless %}
{% endblock %}

```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~32 days

Total

9

Last Release

3164d ago

PHP version history (3 changes)0.1PHP &gt;=5.3.0

0.4.2PHP &gt;=5.6

0.6.4PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/0bbce846c0d9bbaf3fc4f62538f638bb1f093d651e1bca9c0c6e0d97645286f8?d=identicon)[beta](/maintainers/beta)

![](https://avatars.githubusercontent.com/u/16222295?v=4)[Marcos Bezerra de Menezes](/maintainers/marcoslibre)[@marcoslibre](https://github.com/marcoslibre)

![](https://www.gravatar.com/avatar/928e77bd50201c2a30df571e6ff90c01a8cdfe29eec21f57fb7c143ba7c1a35e?d=identicon)[RomainSanchez](/maintainers/RomainSanchez)

![](https://www.gravatar.com/avatar/fc3ab5e7bcedd6769ea7ea27b9b65157b62b4b127296dd6762388d400193b054?d=identicon)[BlastCI](/maintainers/BlastCI)

---

Top Contributors

[![RomainSanchez](https://avatars.githubusercontent.com/u/18164227?v=4)](https://github.com/RomainSanchez "RomainSanchez (19 commits)")[![betaglop](https://avatars.githubusercontent.com/u/5788263?v=4)](https://github.com/betaglop "betaglop (10 commits)")[![FanchTheSystem](https://avatars.githubusercontent.com/u/882203?v=4)](https://github.com/FanchTheSystem "FanchTheSystem (8 commits)")[![PapsOu](https://avatars.githubusercontent.com/u/5792207?v=4)](https://github.com/PapsOu "PapsOu (8 commits)")[![sentinellesduweb](https://avatars.githubusercontent.com/u/53866807?v=4)](https://github.com/sentinellesduweb "sentinellesduweb (3 commits)")[![NicolasSdw](https://avatars.githubusercontent.com/u/15262688?v=4)](https://github.com/NicolasSdw "NicolasSdw (2 commits)")[![GlennCavarle](https://avatars.githubusercontent.com/u/10597426?v=4)](https://github.com/GlennCavarle "GlennCavarle (1 commits)")

---

Tags

symfonysonatae-venementlibio

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/libre-informatique-decorator-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/libre-informatique-decorator-bundle/health.svg)](https://phpackages.com/packages/libre-informatique-decorator-bundle)
```

###  Alternatives

[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)

PHPackages © 2026

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