English project 2013-2014, Thibaut Smith and Clement Schanen.
- Web server --
Firstly, be sure to have a working PHP/SQL web server. Symfony is compatible with most web servers, but the easiest configuration would probably be on Apache.
- Downloading Symfony --
Then install Symfony. We advice you to use Composer: for more information about Composer, please check here. About ways to download Symfony, and Symfony itself. To install Symfony using Composer, you can use this command:
php composer.phar create-project symfony/framework-standard-edition path/ 2.4.2
(you may edit path/ for a more sexy url, or `mv` it to something else)
- Downloading this bundle --
Install this bundle. Create a directory TN
in path/src/
, then clone this repository:
git clone https://github.com/TelecomNancyNet/TOEICTrainerBundle.git
- Install BraincraftedBootstrapBundle --
Firstly, you have to download the BraincraftedBootstrapBundle using composer.
So you need to edit path/composer.json
with this informations :
{
"require": {
"braincrafted/bootstrap-bundle": "~2.0"
}
}
{
"repositories": [
{
"type": "package",
"package": {
"name": "jquery/jquery",
"version": "1.10.2",
"dist": {
"url": "http://code.jquery.com/jquery-1.10.2.js",
"type": "file"
}
}
}
],
"require": {
... other dependencies
"twbs/bootstrap": "3.0.*",
"jquery/jquery": "1.10.*"
}
}
And add the bundle to path/app/AppKernel.php
:
# app/AppKernel.php
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// ...
new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle(),
);
// ...
}
}
Finally, if you use Assetic, you can run this command :
php app/console assetic:dump
php app/console assets:install
If it is not the case, see further informations see in BraincraftedBootstrapBundle website's.
- Integration of the bundle --
Integrate into your working Symfony installation: edit path/src/AppKernel.php
and add the following code in the $bundles array:
new TN\TOEICTrainerBundle\TOEICTrainerBundle(),
Then add the bundle's routes. Head to path/app/config/routing.yml
and add the following:
toeic_t:
resource: "@TOEICTrainerBundle/Resources/config/routing.yml"
prefix: /toeic
Finally, create symbolic link from path/web/bundles/toeictrainer
to path/TN/TOEICTrainerBundle/Resources
by running this command :
php app/console assets:install web/ --symlink