PHPackages                             blast-project/core-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. blast-project/core-bundle

ActiveSymfony-bundle

blast-project/core-bundle
=========================

This is the core of Libre Informatique Symfony2 projects

0.6.4(8y ago)27.0k3[1 issues](https://github.com/blast-project/CoreBundle/issues)14LGPL-3.0PHPPHP &gt;=7.1

Since Feb 15Pushed 8y ago3 watchersCompare

[ Source](https://github.com/blast-project/CoreBundle)[ Packagist](https://packagist.org/packages/blast-project/core-bundle)[ Docs](https://github.com/blast-project/CoreBundle)[ RSS](/packages/blast-project-core-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (9)Versions (11)Used By (14)

Blast CoreBundle
================

[](#blast-corebundle)

[![Scrutinizer](https://camo.githubusercontent.com/eb2e68a93060fd16b9970e167eeb07905d4167f0d29b66918fe03e18f41f8f34/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f66696c702f77686f6f70732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/blast-project/CoreBundle)[![Travis](https://camo.githubusercontent.com/21a6b05fd0bcd4c0cb56fba3ee11c2cd33989e1ca8136fab58c8f49c245c4134/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f626c6173742d70726f6a6563742f436f726542756e646c652e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/blast-project/CoreBundle)[![Coveralls](https://camo.githubusercontent.com/f0619949b895696fe45248284325661c9cc5e82f26ffbc75851d1647a4b403aa/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c732f626c6173742d70726f6a6563742f436f726542756e646c652e7376673f7374796c653d666c61742d737175617265)](https://coveralls.io/github/blast-project/CoreBundle?branch=master)[![License](https://camo.githubusercontent.com/5eb6d8b4d7ddf0dd960f5243ad4ab4863480f8664b0dd3c256c350796506e3ea/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f626c6173742d70726f6a6563742f436f726542756e646c652e7376673f7374796c653d666c61742d737175617265)](./LICENCE.md)

[![Latest Stable Version](https://camo.githubusercontent.com/b7d295c024887bdb5c68ff42e9f8724275e9768436a69fa83d7c40dfde172be6/68747470733a2f2f706f7365722e707567782e6f72672f626c6173742d70726f6a6563742f636f72652d62756e646c652f762f737461626c65)](https://packagist.org/packages/blast-project/core-bundle)[![Latest Unstable Version](https://camo.githubusercontent.com/e2b5540c88e4652caa11e2a6fc31817dc86bd50fd613b5b6f8483c4d568256ec/68747470733a2f2f706f7365722e707567782e6f72672f626c6173742d70726f6a6563742f636f72652d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/blast-project/core-bundle)[![Total Downloads](https://camo.githubusercontent.com/2b624b1a64217209e6e986dff85ab4fa4eca0e72c2baa13cff06929ba1c22356/68747470733a2f2f706f7365722e707567782e6f72672f626c6173742d70726f6a6563742f636f72652d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/blast-project/core-bundle)

The goal of this bundle is to make the use of SonataAdmin "view-models" possible without writting a line of PHP, without loosing a feature of Sonata, and importing the idea of composite settings using lots of characteristics of an admin (its direct inheritance tree, the traits used by its Entity, the inheritance tree of its Entity...), making things more flexible, extendable, reusable and maintenable through many bundles and uses.

This bundle is the next step after the SonataAdminBundle. Configure an entire backend bundle filling only YAML files... Try it!

It is also the core of [Libre Informatique](https://github.com/libre-informatique/)'s Symfony 2/3 projects.

Example
=======

[](#example)

I want to design and create a bundle as a toolbox for other bundles' entities. It will provide traits for email addresses and phonenumbers, for instance (cf. [BlastBaseEntitiesBundle](https://github.com/libre-informatique/SymfonyBlastBaseEntitiesBundle)).

Using the BlastCoreBundle, your "base" bundle will carry the traits, but also the way to display properties given by its traits in a SonataAdmin (which becomes a CoreAdmin) CRUD. Then using the traits of your "base" bundle in the entities of other bundles (also implementing the BlastCoreBundle) will add the fields naturally, the columns in the list of objects, etc... as you set up for your trait in your "base" bundle, without having to write a line for this.

Imagine this feature appliable to 50 entities distributed in 10 bundles, and count in your mind the number of saved lines, the number of potential bugs avoided and the ease of maintenance when you want to change the nature of the field used by the provided email address or phonenumber... This is what the BlastCoreBundle permits.

Installation
============

[](#installation)

Prerequisites
-------------

[](#prerequisites)

- 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, with /usr/local/bin in the path)

Downloading
-----------

[](#downloading)

$ composer require blast-project/core-bundle dev-master

This will download and install :

- knplabs/knp-menu
- knplabs/knp-menu-bundle
- cocur/slugify
- sonata-project/core-bundle
- sonata-project/cache
- sonata-project/block-bundle
- sonata-project/exporter
- twig/extensions
- sonata-project/admin-bundle
- sonata-project/doctrine-orm-admin-bundle
- blast-project/core-bundle
- libre-informatique/base-entities-bundle
- twig/twig ^1.22.1

Third party bundles, Sonata bundles
-----------------------------------

[](#third-party-bundles-sonata-bundles)

Please refer to the Sonata Project's instructions, foundable here :

And follow the installation guides.

At the end, you should have a `app/AppKernel.php` that looks like that:

```
