2017 © Pedro Peláez
 

symfony-bundle module-bundle

Padam87 ModuleBundle

image

padam87/module-bundle

Padam87 ModuleBundle

  • Monday, May 26, 2014
  • by Padam87
  • Repository
  • 2 Watchers
  • 4 Stars
  • 268 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Module Bundle

Modulariazion for Symfony2. Enable / disable modules., (*1)

1. Example

/**
 * @Route("/")
 * @Template()
 * @Module("blog.main")
 */
public function indexAction(Request $request)
{

This annotation will throw an exception if the module is not enabled., (*2)

In twig

{% if module_active('blog.main') %}
    link to blog
{% endif %}

2. Installation

2.1. Composer

"padam87/module-bundle": "dev-master",

2.2. AppKernel:

$bundles = array(
    ...
    new Padam87\ModuleBundle\Padam87ModuleBundle(),
);        

2.3. Routing:

Padam87ModuleBundle:
    resource: "@Padam87ModuleBundle/Controller/"
    type:     annotation
    prefix:   /admin

The route will be /admin/modules this way... feel free to modify., (*3)

2.4. config.yml

imports:
    ...
    - { resource: modules.yml }
    - { resource: "@Padam87ModuleBundle/Resources/config/config.yml" }

modules.yml

Create your modules.yml. Example:, (*4)

parameters:
  modules:
    blog:
      main: true
      comments: true
      history: true
      tags: true

Note: If you set one of the options to false, you wont be able to see that module in the admin, so it will be permanently disabled., (*5)

2.5. View

Athough the bundle provides a default view, you would propably want to create your own. You can do that by adding an:, (*6)

app/Resources/Padam87ModuleBundle/views/Admin/index.html.twig

OR, (*7)

You can create your own bundle as a child of this one., (*8)

Bitdeli Badge, (*9)

The Versions

26/05 2014

dev-master

9999999-dev https://github.com/Padam87/ModuleBundle

Padam87 ModuleBundle

  Sources   Download

MIT

by Adam Prager

symfony modularization

26/05 2014

v1.1.2

1.1.2.0 https://github.com/Padam87/ModuleBundle

Padam87 ModuleBundle

  Sources   Download

MIT

by Adam Prager

symfony modularization

26/05 2014

v1.1.0

1.1.0.0 https://github.com/Padam87/ModuleBundle

Padam87 ModuleBundle

  Sources   Download

MIT

by Adam Prager

symfony modularization

26/05 2014

v1.1.1

1.1.1.0 https://github.com/Padam87/ModuleBundle

Padam87 ModuleBundle

  Sources   Download

MIT

by Adam Prager

symfony modularization

15/12 2013

v1.0.0

1.0.0.0 https://github.com/Padam87/ModuleBundle

Padam87 ModuleBundle

  Sources   Download

by Adam Prager

symfony modularization