2lenet/crudit-bundle
Composer 安装命令:
composer require 2lenet/crudit-bundle
包简介
The easy like Crud'it Bundle.
README 文档
README
Crudit bundle for 2le.
Installation
Webpack Encore is required and you need to have a security on your application.
require 2lenet/crudit-bundle npm install bootstrap@5 sass sass-loader @fortawesome/fontawesome-free easymde --save
Just add the following lines in your template/base.html.twig
{% extends '@LleCrudit/layout/sb_admin/layout.html.twig' %}
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
{% block javascripts %}
{{ parent() }}
{{ encore_entry_script_tags('app') }}
{% endblock %}
Then, in your assets/js/app.js, you have to add this line :
import '../styles/app.scss';
And in your assets/styles/app.scss, add this :
@import '../../vendor/2lenet/crudit-bundle/assets/sb-admin/css/app.scss';
All new SCSS files must be imported before the import of Crudit SCSS.
Recipes
- Configurations
- Setup Webpack Encore
- Create a CRUD
- Brick
- Menu
- Setup brand
- Filters
- Sublist
- Use a FilterSet in your own Controller
- Form types
- Add a map to a list or to a show
- How to export data
- Workflows
- ProgressBarField
- Markdown
- Color list
- Twig extensions
- Test your application
Principle
A crud is composed by
- an independent controller
- a crud config class
- a datasource
- a filterset if needed
The layout and menu are independent from the crud. You can integrate easily your own controller in a Crudit Layout
Feature
List view
The list view has the following features :
- Pagination
- Sorting
- Item Actions ( Show, Edit and Delete as standard )
- List Actions ( Add and Export csv and excel as standard )
- List grouping ( to save space in repeating values )
- Batch Action ( see Batch actions )
- Possibility to color the lines according to a class passed to the entity ( see Coloring the rows in a list )
- Layout customisation is possible ( doc TODO / Block principle )
The list view need a Datasource but is not bounded to Doctrine or any ORM.
Show view
The show view has the following feature :
- Show all fields
- Title can use the entity to title the object by its name
- Tabs (see Tabs)
- Sublists to show related data ( see Sublist )
- Possibility to color the main card and the title of the show view ( the principle is the same as for the list view: Coloring the rows in a list )
- Layout customisation is possible ( doc TODO / Block principle )
Form view
The edit view is a classical Symfony Form. You write your own FormType
Crudit provides some help to be nicely integrated :
- Many FormType ( Datetime, Entity, etc ...)
- Entity Dropdown based on TomSelect with autocomplete
- DoctrineFormGuesser to automatically use Crudit FormType.
- Markdown editor based on EasyMDE
- Layout customisation is possible ( doc TODO / Block principle )
JS Format input helper
Some help to check the input validity ( upper, email, ip, etc... )
Dependencies
Crudit wants to minimise dependencies on not really popular bundles or components in order to be able to maintain this bundle for many years and to follow the Symfony Stack development without dependency problems.
The layout is inspired by SB Admin 2 but partially rewritten. Many of the features of SB Admin wasn't useful for this project.
The CSS framework used is Bootstrap 5.
Excel export uses phpoffice/phpspreadsheet.
Doctrine is needed for the pre-version but the project is designed to work without it. Feel free to contact us if you want to use other dataprovider.
Development
TO COMPLETE
JS / CSS Developpement
To update the JS or the CSS please run in the bundle
npm install npm run build
2lenet/crudit-bundle 适用场景与选型建议
2lenet/crudit-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 16.61k 次下载、GitHub Stars 达 16, 最近一次更新时间为 2021 年 08 月 10 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「symfony」 「admin」 「generator」 「backend」 「crud」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 2lenet/crudit-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 2lenet/crudit-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 2lenet/crudit-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Memio's PrettyPrinter, used to generate PHP code from given Model
2lenet/EasyAdminPlusBundle
The bundle for easy using json-rpc api on your project
Analysis module for finding problematical shop data.
Bundle Symfony DaplosBundle
Phalcon Model Generator
统计信息
- 总下载量: 16.61k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 17
- 点击次数: 5
- 依赖项目数: 6
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-10
