2017 © Pedro Peláez
 

symfony-bundle website-index-bundle

image

rithis/website-index-bundle

  • Monday, September 10, 2012
  • by rithis
  • Repository
  • 0 Watchers
  • 1 Stars
  • 92 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

RithisWebsiteIndexBundle

Symfony2 Bundle which compile all routes on single page., (*1)

Installation

Run this command in your project directory:, (*2)

``` bash $ composer.phar require rithis/website-index-bundle:@dev, (*3)


After that enable bundle in the kernel: ``` php <?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Rithis\WebsiteIndexBundle\RithisWebsiteIndexBundle(), ); }

Usage

Routing

First of all include bundle routing:, (*4)

``` yaml, (*5)

app/routing.yml

_rithis_website_index: resource: "@RithisWebsiteIndexBundle/Resources/config/routing.yml", (*6)


If you want to make redirect from main page then add one more route: ``` yaml # app/routing.yml _index: pattern: / defaults: { _controller: FrameworkBundle:Redirect:redirect, route: rithis_website_index_website_index_get }

Routes with parameters

By default only routes without parameters compiled. If you want to add routes with parameters you can configure bundle:, (*7)

``` yaml, (*8)

app/config.yml

rithis_website_index: rithis_news_news_get: RithisNewsBundle:News ```, (*9)

Where key (ex. rithis_news_news_get) is route name and value (ex. RithisNewsBundle:News) is entity., (*10)

The Versions

10/09 2012

dev-master

9999999-dev https://github.com/rithis/WebsiteIndexBundle

  Sources   Download

MIT

The Requires

 

by Vyacheslav Slinko