2017 © Pedro Peláez
 

symfony-bundle core-bundle

This is the core of Libre Informatique Symfony2 projects

image

blast-project/core-bundle

This is the core of Libre Informatique Symfony2 projects

  • Wednesday, March 28, 2018
  • by beta
  • Repository
  • 3 Watchers
  • 3 Stars
  • 6,905 Installations
  • PHP
  • 19 Dependents
  • 2 Suggesters
  • 3 Forks
  • 2 Open issues
  • 19 Versions
  • 0 % Grown

The README.md

Blast CoreBundle

Scrutinizer Travis [Coveralls][coveralls] License, (*1)

Latest Stable Version Latest Unstable Version Total Downloads, (*2)

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., (*3)

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

It is also the core of Libre Informatique's Symfony 2/3 projects., (*5)

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)., (*6)

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., (*7)

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., (*8)

Installation

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

$ composer require blast-project/core-bundle dev-master, (*9)

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, (*10)

Third party bundles, Sonata bundles

Please refer to the Sonata Project's instructions, foundable here : https://sonata-project.org/bundles/admin/3-x/doc/reference/installation.html https://sonata-project.org/bundles/user/3-x/doc/reference/installation.html, (*11)

And follow the installation guides., (*12)

At the end, you should have a app/AppKernel.php that looks like that:, (*13)

<?php

use Symfony\Component\HttpKernel\Kernel;
use Symfony\Component\Config\Loader\LoaderInterface;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            //...

            // Add your dependencies
            new Sonata\CoreBundle\SonataCoreBundle(),
            new Sonata\BlockBundle\SonataBlockBundle(),
            new Knp\Bundle\MenuBundle\KnpMenuBundle(),
            //...

            // If you haven't already, add the storage bundle
            // This example uses SonataDoctrineORMAdmin but
            // it works the same with the alternatives
            new Sonata\DoctrineORMAdminBundle\SonataDoctrineORMAdminBundle(),

            // You have 2 options to initialize the SonataUserBundle in your AppKernel,
            // you can select which bundle SonataUserBundle extends
            // Most of the cases, you'll want to extend FOSUserBundle though ;)
            // extend the ``FOSUserBundle``
            //new FOS\UserBundle\FOSUserBundle(),
            //new Sonata\UserBundle\SonataUserBundle('FOSUserBundle'),
            // OR
            // the bundle will NOT extend ``FOSUserBundle``
            //new Sonata\UserBundle\SonataUserBundle(),

            // Then add SonataAdminBundle
            new Sonata\AdminBundle\SonataAdminBundle(),
            new Blast\CoreBundle\BlastCoreBundle(),

            //...
        ];
        //...
    }
    //...
}

And at the end of the app/config/config.yml file:, (*14)

# ...
sonata_block:
    default_contexts: [cms]
    blocks:
        # Enable the SonataAdminBundle block
        sonata.admin.block.admin_list:
            contexts:   [admin]
        # Your other blocks

PostgreSQL

Create the database needed, (*15)

If you are using PostgreSQL as your main database, you'll need to install postgresql-contrib and load the "uuid-ossp" extension :, (*16)

  $ sudo apt-get install postgresql-contrib
  $ echo 'CREATE EXTENSION "uuid-ossp";' | psql [DB]

The "libre-informatique" bundles

Edit your app/AppKernel.php file and add your "libre-informatique" bundle, for instance the "libre-informatique/core-bundle" :, (*17)

    // app/AppKernel.php
    // ...
    public function registerBundles()
    {
        $bundles = array(
            // ...

            // The libre-informatique bundles
            new Blast\CoreBundle\BlastCoreBundle(),

            // your personal bundles
        );
    }

Usages

Configuring your SonataAdminBundle interfaces with YAML properties

Discover the configuration of the CoreBundle., (*18)

Going further...

Read more about the CoreBundle, and how to improve the SonataAdminBundle

Improving the SonataAdminBundle in a generic way, (*19)

Configuring a standalone bundle

Discover the configuration of a standalone bundle., (*20)

Going further using the CoreAdmin

Instead of the Blast\CoreBundle\Admin\Traits\Base trait, you might be interested in : * Blast\CoreBundle\Admin\Traits\Embedded: if the current CoreAdmin aims to be embedded * Blast\CoreBundle\Admin\Traits\Embedding: if the current CoreAdmin aims to embed other forms and you want its embedding fields to be treated automatically, (*21)

Creating new field types., (*22)

Using Sonata Project extensions

If needed, you can easly use the BlastCoreBundle in combination with other bundles from the Sonata Project, for instance :, (*23)

Please refer yourself to the proper documentation from the Sonata Project..., (*24)

Managing entities dashboard groups

Discover the configuration of the dashboard., (*25)

Using Blast Core command tools for patches

Discover how to implement patches, (*26)

The Versions

28/03 2018

dev-wip-platform

dev-wip-platform https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

LGPL-3.0 LGPL-3.0-only

The Requires

 

The Development Requires

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

15/11 2017

dev-wip-lisem

dev-wip-lisem https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

03/11 2017

dev-master

9999999-dev https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

GPL-3.0 LGPL-3.0

The Requires

 

The Development Requires

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

03/11 2017

0.6.4

0.6.4.0 https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

19/10 2017

0.5.2

0.5.2.0 https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

27/09 2017

dev-wip-locale

dev-wip-locale https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

15/09 2017

0.5.1

0.5.1.0 https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

15/09 2017

dev-wip-test

dev-wip-test https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

06/09 2017

dev-feature-sonata_saved_filters

dev-feature-sonata_saved_filters https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

01/09 2017

dev-feature-translation_admin_strategy

dev-feature-translation_admin_strategy https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

26/07 2017

0.4.5

0.4.5.0 https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

27/06 2017

0.4.4

0.4.4.0 https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

15/06 2017

0.4.3

0.4.3.0 https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

LGPL-3.0

The Requires

 

The Development Requires

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

04/05 2017
16/03 2017

0.2

0.2.0.0 https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

GPL-3.0

The Requires

 

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

10/03 2017

dev-sf3.2

dev-sf3.2 https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

GPL-3.0

The Requires

 

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

15/02 2017

0.1

0.1.0.0 https://github.com/blast-project/CoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

GPL-3.0

The Requires

 

by Baptiste SIMON
by Romain SANCHEZ
by Marcos Bezerra de Menezes

symfony sonata e-venement libio

18/08 2016

dev-choices

dev-choices https://github.com/libre-informatique/SymfonyLibrinfoCoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

GPL-3.0

The Requires

 

by Baptiste SIMON

symfony sonata e-venement libio

01/07 2016

dev-sonata-2.x

dev-sonata-2.x https://github.com/libre-informatique/SymfonyLibrinfoCoreBundle

This is the core of Libre Informatique Symfony2 projects

  Sources   Download

GPL-3.0

The Requires

 

by Baptiste SIMON

symfony sonata e-venement libio