소스 검색

AdminLte intégration action sort

master
Fab 3 년 전
부모
커밋
f3bdb05db2
2개의 변경된 파일20개의 추가작업 그리고 13개의 파일을 삭제
  1. +19
    -13
      src/Controller/Admin/PageCrudController.php
  2. +1
    -0
      webpack.config.js

+ 19
- 13
src/Controller/Admin/PageCrudController.php 파일 보기

@@ -3,14 +3,12 @@
namespace App\Controller\Admin;

use App\Entity\Site\Page;
use EasyCorp\Bundle\EasyAdminBundle\Config\Action;
use EasyCorp\Bundle\EasyAdminBundle\Config\Actions;
use EasyCorp\Bundle\EasyAdminBundle\Config\Crud;
use EasyCorp\Bundle\EasyAdminBundle\Field\FormField;
use EasyCorp\Bundle\EasyAdminBundle\Field\NumberField;
use EasyCorp\Bundle\EasyAdminBundle\Field\TextField;
use Lc\SovBundle\Controller\Admin\AbstractCrudController;
use Lc\SovBundle\Field\BooleanField;
use Lc\SovBundle\Field\CKEditorField;
use Lc\SovBundle\Field\GalleryManagerField;
use Lc\SovBundle\Field\ImageManagerField;
use Lc\SovBundle\Field\StatusField;

class PageCrudController extends AbstractCrudController
@@ -22,14 +20,22 @@ class PageCrudController extends AbstractCrudController

public function configureFields(string $pageName): iterable
{
return [
TextField::new('title'),
CKEditorField::new('description'),
ImageManagerField::new('image'),
StatusField::new('status', null, true),
GalleryManagerField::new('gallery'),
TextField::new('devAlias'),
];
$panel = parent::configureFields($pageName);

return array_merge(
[
FormField::addPanel('Général'),
//->setCustomOption('template', '@LcSov/adminlte/crud/_test.html.twig')
TextField::new('title'),
NumberField::new('position')->hideOnForm(),
//BooleanField::new('titlefefe')->setFormTypeOption('mapped', false)->setFormTypeOption('required', true),
StatusField::new('status'),
CKEditorField::new('description'),

],
$panel
);
}


}

+ 1
- 0
webpack.config.js 파일 보기

@@ -45,6 +45,7 @@ Encore
.addEntry('adminlte-common', './Lc/SovBundle/Resources/assets/app/adminlte/common/app.common.js')
.addEntry('adminlte-index', './Lc/SovBundle/Resources/assets/app/adminlte/index/app.index.js')
.addEntry('adminlte-form', './Lc/SovBundle/Resources/assets/app/adminlte/form/app.form.js')
.addEntry('adminlte-sort', './Lc/SovBundle/Resources/assets/app/adminlte/sort/app.sort.js')
.addEntry('adminlte-field-filemanager', './Lc/SovBundle/Resources/assets/app/adminlte/field/filemanager/app.filemanager.js')
.addEntry('adminlte-field-collection', './Lc/SovBundle/Resources/assets/app/adminlte/field/collection/app.collection.js')


Loading…
취소
저장