2017 © Pedro Peláez
 

library silexwebsiteframework

Quickstart building sites with Silex, Twig, Symfony Forms, Imagine and Swiftmailer

image

markei/silexwebsiteframework

Quickstart building sites with Silex, Twig, Symfony Forms, Imagine and Swiftmailer

  • Monday, February 5, 2018
  • by markei
  • Repository
  • 1 Watchers
  • 0 Stars
  • 29 Installations
  • HTML
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

SilexWebsiteFramework

The Markei.nl SilexWebsiteFramework configures all the standard vendors you need to build a site with Silex: Twig, Symfony Forms, Imagine and Swiftmailer, (*1)

Quick start

Create your own Application.php and start registering your routes., (*2)

<?php
namespace Acme\AcmeWebsite;

use Markei\SilexWebsiteFramework\Application as BaseApplication;
use Symfony\Component\HttpFoundation\Request;

class Application extends BaseApplication
{
    protected function getRequiredConfigurationFields()
    {
    return array_merge(parent::getRequiredConfigurationFields(), []);
    }

    protected function registerRoutes()
    {
    $this->get('/first-page', function (Application $app, Request $request) { return $app['controllers.page']->showPageAction($request, 'first-page'); });
    $this->get('/second-page', function (Application $app, Request $request) { return $app['controllers.page']->showPageAction($request, 'second-page'); });
    parent::registerRoutes();
    }

    protected function registerControllers()
    {
    parent::registerControllers();
    }
}

The Versions