prism/poll-bundle 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

prism/poll-bundle

Composer 安装命令:

composer require prism/poll-bundle

包简介

A simple poll bundle for symfony2

README 文档

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.

统计信息

  • 总下载量: 1.29k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 19
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 19
  • Watchers: 3
  • Forks: 12
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-06-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固