定制 nitra/admingenerator-bundle 二次开发

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

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

nitra/admingenerator-bundle

Composer 安装命令:

composer require nitra/admingenerator-bundle

包简介

Admingenerator for Symfony2 based on YAML configuration and Twig templating

README 文档

README

KnpBundles Badge project status build status Latest Stable Version Total Downloads

The Real Missing Admin Generator for Symfony2!

This package is a Symfony2 Admin Generator based on YAML configuration and Twig templating. It's inspired by fzaninotto/Doctrine2ActiveRecord.

Follow us on Twitter!

Don't miss any updates from Symfony2 Admin Generator! Join Twitter today and follow us!

Features:

  • Generate Views and Controllers for Models with one command
  • Configure all options in one (per model) YAML file
  • Includes standard actions: create/edit, show, delete, list/nestedset tree list
  • Flexible and extendable: you can easily add or overwrite almost everything!
  • Supports most popular model managers: Doctrine ORM, Doctrine ODM and Propel
  • Introduces nested forms: create/edit object and all it's associated objects in one form!
  • Manage relations one to one, one to many, many to one and many to many
  • Fully translatable: all field elements (labels, placeholders, helpers), all widgets, actions, error messages and titles
  • List features: sortable, paginated, filters, batch actions, scopes
  • Nestedset tree list features: drag&drop to manage your tree
  • New/Edit featues: fieldsets, tabbable, cool widgets for collection, file upload, date and entity fields
  • Translated into DE, EN (default), ES, FA, FR, GR, IT, JA, NL, PL, PT, RO, RU, SL, TR, UK (you can easily contribute to add your own)
  • Credentials for actions, columns and form fields
  • Complete admin design based on twitter bootstrap (see next section)
  • ... and more!

This bundle in pictures

Preview of list

Preview of edit

Preview of dashboard

Important note

Documentation is currently being rewritten. Old documentation can be found in:

Sorry for inconvenience, we will fix that as soon as possible!

Installation

All the installation instructions are located in documentation.

Documentation

The documentation for this bundle is located in Resources/doc directory. Start by reading Table of contents.

Translations

If you wish to use default texts provided in this bundle, you have to make sure you have translator enabled in your config.

# app/config/config.yml

framework:
    translator: ~

For more information about translations, check Symfony documentation.

Installation

Installation is a 3 step process:

  1. Download NitraThemeBundle using composer
  2. Enable the Bundle
  3. Configure the NitraThemeBundle

Step 1: Download NitraThemeBundle using composer

Add NitraThemeBundle in your composer.json:

{
    "require": {
        "nitra/admingenerator-generator-bundle": "2.3.*@dev"
    }
}

Now tell composer to download the bundle by running the command:

$ php composer.phar update nitra/admingenerator-generator-bundle

Composer will install the bundle to your project's vendor/nitra directory.

Step 2: Enable the bundle

Enable the bundle in the kernel:

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Knp\Bundle\MenuBundle\KnpMenuBundle(),
        new WhiteOctober\PagerfantaBundle\WhiteOctoberPagerfantaBundle(),
        new Admingenerator\GeneratorBundle\AdmingeneratorGeneratorBundle(),
        new Millwright\MenuBundle\MillwrightMenuBundle(),
	new Millwright\ConfigurationBundle\MillwrightConfigurationBundle(),
        new Genemu\Bundle\FormBundle\GenemuFormBundle(),
        new Pinano\Select2Bundle\PinanoSelect2Bundle(),
	new FOS\UserBundle\FOSUserBundle(),
    );
}

Step 3: Configure

Add the following configuration to your config.yml file according to which type of datastore you are using.

# app/config/config.yml
imports:
    - { resource: menu.yml }
    - { resource: ../../vendor/nitra/doctrine-behaviors/config/orm-services.yml }


# Assetic Configuration
assetic:
    debug:          %kernel.debug%
    use_controller: false
    bundles:        [ AdmingeneratorGeneratorBundle ]
    #java: /usr/bin/java
    filters:
        cssrewrite: ~
        lessphp: ~

# Doctrine Configuration
doctrine:
    orm:
        filters:
            softdeleteable:
                class: Admingenerator\GeneratorBundle\Filter\SoftDeleteableFilter
                enabled: true
        hydrators:
            KeyPair: Admingenerator\GeneratorBundle\Hydrators\KeyPairHydrator      
            
# FOS Configuration
fos_user:
    db_driver: orm # other valid values are 'mongodb'
    firewall_name: main
    user_class: Nitra\NitraThemeBundle\Entity\User
	
# Admingenerator Configuration
admingenerator_generator:
    base_admin_template: ::base_admin.html.twig
    use_doctrine_orm: true
    stylesheets: []
    logout_path: fos_user_security_logout
    twig:
        use_localized_date: true
        use_form_resources: true
        date_format: 'Y-M-d'
        localized_date_format: 'medium'
        localized_datetime_format: 'medium'
        datetime_format: 'Y-m-d H:i'  
        number_format:
            decimal: 2
            decimal_point: ','
            thousand_separator: ' '
    colors:
        link:       '#128bbd'
        border:     '#c3c3c3'
        main:       '#008abd'
        dark_main:  '#005b7d'
        light_main: '#cbe6f2'
        gray:       '#bfbfbf'
        hover:      '#0f769f'
            
# Замена combobox на Select2             
genemu_form:
    select2:
        enabled: true
        
# Add blameable listener
parameters:
    knp.doctrine_behaviors.blameable_listener.user_entity: Nitra\NitraThemeBundle\Entity\User			

nitra/admingenerator-bundle 适用场景与选型建议

nitra/admingenerator-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.42k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2014 年 05 月 15 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「admin」 「generator」 「yaml」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 nitra/admingenerator-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 nitra/admingenerator-bundle 我们能提供哪些服务?
定制开发 / 二次开发

基于 nitra/admingenerator-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 2.42k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 7
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-05-15