tito / poll-bundle
A simple poll bundle for symfony2
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 13
Type:symfony-bundle
Requires
- stof/doctrine-extensions-bundle: ~1.1@dev
- symfony/symfony: 2.4.*
This package is auto-updated.
Last update: 2024-10-07 10:29:20 UTC
README
A simple poll bundle for symfony2.
This version is for Symfony 2.4.x projects.
For Symfony 2.0.x projects, you must use a 1.x release of this bundle.
Features
- List of all published polls
- Uses Ajax for voting and showing results
- Results displayed using bar graphs
- Uses cookies to prevent multiple voting
- A backend interface
- Easily overridable
Screenshots:
Note: The backend doesn't come with an authentication system.
TODO:
- Functional tests
- Rewrite "Overriding the bundle" documentation for symfony 2.4.x
Installation
1. Add this to your composer.json:
"require": { "prism/poll-bundle": "dev-master" }
2. Run a composer update:
$ composer update
3. Register the bundle in app/AppKernel.php
:
(You also need to add StofDoctrineExtensionsBundle for the timestampable and sluggable features)
$bundles = array( // ... new Prism\PollBundle\PrismPollBundle(), new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(), );
4. Import routing:
# app/config/routing.yml PrismPollBundle_backend: prefix: /poll/backend resource: "@PrismPollBundle/Resources/config/routing/backend.yml" PrismPollBundle_frontend: prefix: /poll resource: "@PrismPollBundle/Resources/config/routing/frontend.yml"
5. Add configuration for DoctrineExtensions:
# app/config/config.yml stof_doctrine_extensions: orm: default: timestampable: true sluggable: true
6. Generate the tables:
$ app/console doctrine:schema:update --force
This will create the PrismPoll and PrismPollOpinion tables
Overriding the bundle
TODO: rewrite the documentation for Symfony 2.4.x projects.
You can still get the general idea by reading the documentation for Symfony 2.0.x projects.