he8us/feedback-bundle

该包已被 废弃 并不再维护。没有推荐替代包。

Symfony 3 用户反馈组件

安装: 40

依赖者: 0

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 0

开放问题: 3

类型:项目

1.0.1 2016-10-23 22:07 UTC

README

Scrutinizer Code Quality Build Status

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 }}