oneup/ contao-backend-sortable-list-views
即使在没有父表的情况下也能使后端列表视图可排序。
1.0.4
2023-09-04 13:28 UTC
Requires
- php: ^8.1
- contao/core-bundle: ^4.13
- contao/manager-plugin: ^2.3.1
- doctrine/dbal: ^3.3
- symfony/config: ^5.4 || ^6.0
- symfony/dependency-injection: ^5.4 || ^6.0
- symfony/http-foundation: ^5.4 || ^6.0
- symfony/http-kernel: ^5.4 || ^6.0
- symfony/routing: ^5.4 || ^6.0
- twig/twig: ^3.0
Requires (Dev)
README
为Contao添加缺失的排序模式:无需父表的自定义排序。
安装
需要捆绑包
composer require oneup/contao-backend-sortable-list-views
添加路由
# config/routes.yaml OneupContaoBackendSortableListViewsBundle: resource: "@OneupContaoBackendSortableListViewsBundle/config/routes.yaml"
配置
# contao/dca/tl_my_custom_table.php // Add sorting flag $GLOBALS['TL_DCA']['tl_my_custom_table']['list']['sorting']['sortableListView'] = true; // Add database field $GLOBALS['TL_DCA']['tl_my_custom_table']['fields']['sorting']['sql'] = 'int(10) unsigned NOT NULL default 0';
运行Contao迁移/数据库更新,享受快乐的拖放排序!
开发
后端
安装依赖项
composer install
运行代码风格修复器
php composer cs-fixer
运行静态分析器
php composer phpstan
运行单元测试
php composer phpunit
前端
安装依赖项
npm install
构建前端资产
npm run build