sonofliberty/news-bundle

此包已被 废弃 且不再维护。作者建议使用 sonofliberty/news-bundle 包。

简单的新闻/博客发布包

安装: 7

依赖者: 0

推荐者: 0

安全性: 0

星标: 0

关注者: 1

分支: 0

开放性问题: 0

类型:symfony-bundle

0.1.1 2019-02-24 13:11 UTC

This package is auto-updated.

Last update: 2021-01-26 04:36:03 UTC


README

Build Status

Symfony 包具有简单的博客/发布功能

安装

  1. 通过 composer 安装

    composer require sonofliberty/news-bundle

  2. 启用包

    // app/AppKernel.php
    
    public function registerBundles()
    {
        return array(
            // ...
            new SonOfLiberty\NewsBundle\SonOfLibertyNewsBundle(),
            new Knp\Bundle\PaginatorBundle\KnpPaginatorBundle(),
            new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(), // needed for translations
            // ...
        );
    }
  3. 配置

    # app/config/config.yml
    
    son_of_liberty_news:
        author:
            class: Acme\AcmeBundle\Entity\User # optional
  4. 导入路由

    # app/config/routing.yml
    
    son_of_liberty_news:
        prefix: /news
        resource: '@SonOfLibertyNewsBundle/Resources/config/routing.yaml'