定制 endroid/behavior-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

endroid/behavior-bundle

最新稳定版本:1.1.0

Composer 安装命令:

composer require endroid/behavior-bundle

包简介

Endroid Behavior Bundle

README 文档

README

By endroid

Latest Stable Version Build Status Total Downloads Monthly Downloads License

This bundle provides default behaviors you can apply to your classes via interfaces and traits. Admin extensions, Doctrine filters and event listeners are provided to enforce the behaviors.

knpbundles.com

Requirements

  • Symfony

Installation

Use Composer to install the bundle.

$ composer require endroid/behavior-bundle

Then enable the bundle via the kernel.

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = [
        // ...
        new Endroid\Bundle\BehaviorBundle\EndroidBehaviorBundle(),
    ];
}

Configuration

Doctrine filters

By default only published content for the current language should be retrieved from the database. The following configuration enforces this behavior.

doctrine:
    orm:
        filters:
            publishable:
                class:   Endroid\Bundle\BehaviorBundle\Filter\PublishableFilter
                enabled: false

Of course these filters are optional and you can enable or disable them at any point.

Admin extensions

Admin extensions for Sonata Admin add functionality to the backend and enable you to publish, sort and traverse items. The following configuration adds this functionality to all admin classes implementing the described interfaces.

sonata_admin:
    extensions:
        endroid_behavior.admin.extension.publishable:
            implements:
                - Endroid\Bundle\BehaviorBundle\Model\PublishableInterface
        endroid_behavior.admin.extension.sortable:
            implements:
                - Endroid\Bundle\BehaviorBundle\Model\SortableInterface
        endroid_behavior.admin.extension.traversable:
            implements:
                - Endroid\Bundle\BehaviorBundle\Model\TraversableInterface

Versioning

Version numbers follow the MAJOR.MINOR.PATCH scheme. Backwards compatibility breaking changes will be kept to a minimum but be aware that these can occur. Lock your dependencies for production and test your code when upgrading.

License

This bundle is under the MIT license. For the full copyright and license information please view the LICENSE file that was distributed with this source code.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-12