yit/help-bundle

此包已被废弃且不再维护。未建议替代包。

安装: 187

依赖者: 0

建议者: 0

安全: 0

星星: 0

关注者: 12

分支: 0

开放问题: 0

类型:symfony-bundle

1.0.4 2015-06-19 13:28 UTC

This package is not auto-updated.

Last update: 2017-07-16 11:24:25 UTC


README

HelpBundle used following bundles(see HelpBundle's composer.json):
1. FOSRestBundle
2. JMSDiExtraBundle
3. JMSSerializerBundle
4. NelmioApiDocBundle
5. StofDoctrineExtensionsBundle
6. StfalconTinymceBundle
HelpBundle used following modules to overwrite base template (see HelpBundle's layout.html.twig):
1. angular
2. ngResource
3. ngSanitize
4. ngAnimate
5. ngStrap
6. Bootstrap CSS

在composer.json中添加HelpBundle

{
    "require": {
        "yit/help-bundle": "dev-master",
    }
}

现在更新composer。

Composer将安装该包到您的项目vendor/yit目录。

步骤 2: 启用包

在内核中启用包

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Yit\HelpBundle\YitHelpBundle(),
    );
}

步骤 3: 配置HelpBundle

将以下配置添加到您的config.yml文件中

# app/config/config.yml
stfalcon_tinymce:
    include_jquery:       false
    tinymce_jquery:       false
    theme:
          # Simple theme: same as default theme
          simple:
               plugins:
                   - "advlist autolink lists link image charmap print preview hr anchor pagebreak"
                   - "searchreplace wordcount visualblocks visualchars code fullscreen"
                   - "insertdatetime media nonbreaking save table contextmenu directionality"
                   - "emoticons template paste textcolor"
               toolbar1: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image"
               toolbar2: "print preview media | forecolor backcolor emoticons | stfalcon | example"
               image_advtab: true

stof_doctrine_extensions:
    default_locale: en_EN
    translation_fallback: false
    orm:
        default:
            sluggable: true

步骤 3.1: 配置HelpBundle

如果项目没有用户认证,将以下配置添加到您的config.yml文件中

# app/config/config.yml
yit_help:
    secure: false

###步骤 4: 导入HelpBundle路由文件

# app/config/routing.yml
yit_help:
    resource: "@YitHelpBundle/Controller/"
    type:     annotation
    prefix:   /

help_article_rest:
    type:     rest
    resource: Yit\HelpBundle\Controller\Rest\ArticleController

help_category_rest:
    type:     rest
    resource: Yit\HelpBundle\Controller\Rest\CategoryController

步骤 5: 更新数据库模式

现在包已配置,您需要做的最后一件事是更新数据库模式。