Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/desarrolla2/pollbundle
poll Bundle for symfony 2
https://github.com/desarrolla2/pollbundle
Last synced: about 1 month ago
JSON representation
poll Bundle for symfony 2
- Host: GitHub
- URL: https://github.com/desarrolla2/pollbundle
- Owner: desarrolla2
- Created: 2012-03-20T07:55:04.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2013-09-02T21:24:55.000Z (over 11 years ago)
- Last Synced: 2023-03-12T03:38:35.331Z (almost 2 years ago)
- Language: PHP
- Homepage:
- Size: 97.7 KB
- Stars: 8
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Poll Bundle for Symfony2/Doctrine2
attention!!! **This bundle is discontinued, you might want to use the
[enquiryBundle](https://github.com/Bodaclick/EnquiryBundle)**This bundle provides a poll feature for your web site.
You need to have installed the bundles DoctrineMigrationsBundle and DoctrineFixturesBundle
if you do not, below you will find detailed installation instructions.## Installation:
### Get the bundle
Add to your `/deps` file :
```
[PollBundle]
git=http://github.com/desarrolla2/PollBundle.git
target=/bundles/Desarrolla2/PollBundle
````
And make a`php bin/vendors install`
### Register the namespace
``` php
registerNamespaces(array(
'Desarrolla2' => __DIR__.'/../vendor/bundles',
// your other namespaces
));
```### Register the bundle
``` php
registerNamespaces(array(
//...
'Doctrine\\DBAL\\Migrations' => __DIR__.'/../vendor/doctrine-migrations/lib',
'Doctrine\\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib',
));
```### Register bundle
``` php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
//...
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
);
}
```### Update database
execute
`php app/console doctrine:schema:update --force`
Be careful that this will run SQL statements and you could lose data on your database
You can follow detail install instruction in
[this link](http://symfony.com/doc/master/bundles/DoctrineMigrationsBundle/index.html)## Installation note for Database fixtures:
If you like to load example fixtures in database you need install
DoctrineFixturesBundle, if you have not yet.### Get the bundle
Add to your `/deps` file :
```
[doctrine-fixtures]
git=http://github.com/doctrine/data-fixtures.git[DoctrineFixturesBundle]
git=http://github.com/symfony/DoctrineFixturesBundle.git
target=/bundles/Symfony/Bundle/DoctrineFixturesBundle
```Update vendors
`php bin/vendors install`
### Register namespace
``` php
// app/autoload.php
$loader->registerNamespaces(array(
// ...
'Doctrine\\Common\\DataFixtures' => __DIR__.'/../vendor/doctrine-fixtures/lib',
'Doctrine\\Common' => __DIR__.'/../vendor/doctrine-common/lib',
// ...
));
```### Register bundle
``` php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
//...
new Symfony\Bundle\DoctrineFixturesBundle\DoctrineFixturesBundle(),
);
}
```### Install Fixtures
Execute
`php app/console doctrine:fixtures:load`
Be careful that this will run SQL statements and you could lose data on your database
You can follow detail install instruction in
[this link](http://symfony.com/doc/current/bundles/DoctrineFixturesBundle/index.html)