2017 © Pedro Peláez
 

symfony-bundle basebundle

SanSIS Base Bundle for Symfony development

image

sansis/basebundle

SanSIS Base Bundle for Symfony development

  • Tuesday, July 19, 2016
  • by phackwer
  • Repository
  • 5 Watchers
  • 3 Stars
  • 1 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

README

This Bundle for Symfony solves some of the most basic issues on web development at SanSIS. Currently, there are over 15 projects using it directly on the brazilian government., (*1)

A responsive interface, an easy to use way to create cruds (automation on the way), user administration, and the mini data-mining bundle plus the messaging bundle provides eveything small enterprises look for when trying to reduce costs on their development., (*2)

Serving as base for the development, it forces the programmer to adopt a lot of good practices and to follow standards for their codind., (*3)

Requires

        "friendsofsymfony/jsrouting-bundle" : "1.4.*@dev",
        "braincrafted/bootstrap-bundle" : "2.0.*",
        "twitter/bootstrap" : "3.1.*",
        "knplabs/knp-menu-bundle" : "1.1.2",
        "knplabs/knp-paginator-bundle" : "~2.4",
        "psliwa/pdf-bundle" : "dev-master"

Use it in another project

composer.json:, (*4)

    [...]
    "require" : {
        [...]
        "sansis/basebundle" : "dev-master"
    },
    "repositories" : [{
        "type" : "vcs",
        "url" : "https://github.com/phackwer/BaseBundle.git"
    }],
    [...]

Add to AppKernel

         //SanSIS Core Production Bundles
         new SanSIS\Core\BaseBundle\SanSISCoreBaseBundle(),

Add to routing.yml

san_sis_core_base:
    resource: "@SanSISCoreBaseBundle/Resources/config/routing.yml"
    prefix:   /

Extend your twigs

Use {% extends "SanSISCoreBaseBundle::base.html.twig" %} on your twig templates to work ok Remember you can change a lot of blocks. Check the resource and modify the blocks you want., (*5)

Extend your AppKernel

Change your kernel to extend from the one provided by BaseBundle., (*6)

Change:, (*7)

use Symfony\Component\HttpKernel\Kernel;

To:, (*8)

use SanSIS\Core\BaseBundle\Component\HttpKernel\Kernel;

Customize your base.html.twig to extend from BaseBundle

This is a sample on how to create your own visual identity and the main blocks of code for your page layout, (*9)

{% extends "SanSISCoreBaseBundle::base.html.twig" %}, (*10)

{% block css %} {% endblock %}, (*11)

{% block title %}Company's name - System's name{% endblock %}, (*12)

{% block sigla_sistema %}SYS{% endblock %} {% block descricao_sistema %}System's name{% endblock %}, (*13)

{% block entidade_sistema %}Entity's name{% endblock %} {% block info_sessao %}Anything you want{% endblock %}, (*14)

{% block page_menu %}{{ knp_menu_render('YourProjectBundle:Builder:menu', {'nav_type': 'navbar', 'template':'SanSISCoreBaseBundle:menu:sansis_menu.html.twig'}) }}{% endblock %}, (*15)

{% block copyright_footer %} © Company's name {% endblock %}, (*16)

{% block javascript_libs %} {% endblock %}, (*17)

Use the CRUD structure of BaseBundle for powerfull and fast development!

The most amazing and useful function of BaseBundle is the Crud Infrastructure created for it., (*18)

You may use it for complex entities with a huge number of inner entities (that can have their own inner entity as well!)., (*19)

For this, you must declare the @innerEntity annotation on top of vars that are ArrayCollections from Doctrine project., (*20)

And your form field's names must follow the object infrastructure., (*21)

Here are the objects you must extend from in order to get it working:, (*22)

  • Controllers: \SanSIS\Core\BaseBundle\Controller\ControllerCrudAbstract
  • Services: \SanSIS\Core\BaseBundle\Service\EntityServiceAbstract
  • Entities: \SanSIS\Core\BaseBundle\Entity\AbstractBase
  • Repositories: \SanSIS\Core\BaseBundle\EntityRepository\AbstractBase

The Versions

19/07 2016

dev-master

9999999-dev

SanSIS Base Bundle for Symfony development

  Sources   Download

BSD

by Pablo Santiago Sanchez

base bundle symfony development

19/07 2016

v1.0.0

1.0.0.0

SanSIS Base Bundle for Symfony development

  Sources   Download

BSD

by Pablo Santiago Sanchez

base bundle symfony development