he8us / feedback-bundle
该包已被 废弃 并不再维护。没有推荐替代包。
Symfony 3 用户反馈组件
1.0.1
2016-10-23 22:07 UTC
Requires
- php: >=7.0
- doctrine/orm: ~2.5
- gedmo/doctrine-extensions: ^2.4
- gregwar/captcha-bundle: ~2.0
- symfony/symfony: ~3.0
Requires (Dev)
- phpunit/phpunit: ^5.6
- symfony/phpunit-bridge: ^3.1
This package is not auto-updated.
Last update: 2023-06-10 12:12:03 UTC
README
Symfony 3 FeedbackBundle
基于 bulutyazilim/FeedbackBundle,但进行了大量修改以遵循 Symfony3 代码风格和最佳实践
##安装
###步骤 1
需要此包
composer require "he8us/feedback-bundle"
###步骤 2
将这些行添加到您的 app/AppKernel.php 文件中
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... // We depends on this bundle so you need to require it new \Gregwar\CaptchaBundle\GregwarCaptchaBundle(), new He8us\FeedbackBundle\He8usFeedbackBundle(), ); // ... } // ... }
##步骤 3
导入路由
# We depends on this bundle so you need to require it's routes captcha: resource: "@GregwarCaptchaBundle/Resources/config/routing/routing.yml" prefix: / feedback: resource: "@He8usFeedbackBundle/Resources/config/routing.yml" prefix: /
步骤 4
添加配置到 app/config.yml 请不要忘记定义您的视图基础
gregwar_captcha: ~ # Twig Configuration twig: globals: admin_base_view: '::base.html.twig'
步骤 5
将 CSS 和 JavaScript 文件添加到您的布局中
<!-- Add the CSS in the <head></head> of your template <link rel="stylesheet" href="{{ asset("bundles/he8usfeedback/css/feedback.css") }}"/> </head>
<!-- Add the javascript at the very end of your HTML --> <script src="{{ asset('bundles/he8usfeedback/js/feedback.js') }}"></script> <script src="{{ asset('bundles/he8usfeedback/js/admin.js') }}"></script> <script src="{{ asset('bundles/he8usfeedback/js/html2canvas.min.js') }}"></script> </body>
步骤 6
设置一些分类
步骤 7
在您的 twig 文件中 </body>
前添加以下内容
{{ feedback_widget()|raw }}