theodo / quiz-bundle
A simple quiz generator bundle
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 3
Open Issues: 0
Type:symfony-bundle
Requires
- symfony/dependency-injection: >=2.1,<2.3-dev
- symfony/form: >=2.1,<2.3-dev
- symfony/http-kernel: >=2.1,<2.3-dev
- symfony/validator: >=2.1,<2.3-dev
- twitter/bootstrap: v2.3.1
Requires (Dev)
- phake/phake: dev-master
- symfony/yaml: >=2.1,<2.3-dev
Suggests
- symfony/yaml: Allows using YamlQuestionManager.
This package is not auto-updated.
Last update: 2024-12-17 07:02:41 UTC
README
This is TheodoQuizBundle. A simple bundle for managing quizes etc.
Installation
This bundle is not yet available through composer. In order to add the
bundle to your symfony2 project, please add the following repository to
the repositories already available in your composer.json
file.
[...] "repositories": [ {...}, { "type": "vcs", "url": "https://github.com/theodo/TheodoQuizBundle.git" } ],
Then add the bundle to the required bundles of your application below:
"require": { ..., "theodo/quiz-bundle": "dev-master" },
Next, you only need to update your project using composer.phar
:
$ php composer.phar update theodo/quiz-bundle
Enabling the bundle in your project
To enable the bundle to work, you need to register it in the
app/AppKernel.php
class of your project, by adding it to the
registered bundles as follow:
public function registerBundles() { $bundles = array( // ... new Theodo\QuizBundle\TheodoQuizBundle(), ); }
Last but not least, the routing activation: You will need to load the
routing configuration of the bundle to access the web pages generated by
the bundle. To do so, edit the app/config/routing.yml
file of your
project and add the following lines at the end:
theodo_quiz: resource: "@TheodoQuizBundle/Resources/config/routing/questions.xml" prefix: /
Feel free to change the prefix to move the pages to another prefixed URL.
Twitter Bootstrap dependency
For the web interface to be as comfortable as possible, the templating system of the bundles requires Twitter Bootstrap's stylesheets.
If you have arrived so far, it means that the Twitter Bootstrap files
are already part of your project (indeed it has been downloaded during
the composer update
command of the bundle). You only need to copy
the appropriate files to the appropriate place. Don't worry, we did not
leave you alone in front of this tedious task. A script is provided,
that needs to be triggered after composer install
and
composer update
commands. Just add to your composer.json
file
the following lines:
"scripts": { "post-install-cmd": [ ..., "Theodo\\QuizBundle\\Composer\\ScriptHandler::symlinkTwitterBootstrapFiles" ], "post-update-cmd": [ ..., "Theodo\\QuizBundle\\Composer\\ScriptHandler::symlinkTwitterBootstrapFiles" ] },
The last thing you will need to do to have a fully functional
theodo/quiz-bundle
in your project, is to launch the following
command to copy the required Twitter Bootstrap files:
$ php composer.phar install
Enjoy!