fix some stuff in CRUD

This commit is contained in:
Julien Fastré 2020-03-13 12:42:58 +01:00
parent e59f58f461
commit d87b188c4f
2 changed files with 9 additions and 0 deletions

View File

@ -60,6 +60,8 @@ class EntityPersonCRUDController extends CRUDController
return '@ChillPerson/CRUD/new.html.twig';
case 'edit':
return '@ChillPerson/CRUD/edit.html.twig';
case 'view':
return '@ChillPerson/CRUD/view.html.twig';
default:
return parent::getTemplateFor($action, $entity, $request);
}

View File

@ -4,6 +4,7 @@ namespace Chill\PersonBundle\Controller;
use Chill\MainBundle\CRUD\Controller\CRUDController;
use Symfony\Component\HttpFoundation\Request;
use Chill\MainBundle\Pagination\PaginatorInterface;
/**
* Controller for closing motives
@ -31,4 +32,10 @@ class AdminClosingMotiveController extends CRUDController
return $entity;
}
protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator)
{
/** @var \Doctrine\ORM\QueryBuilder $query */
return $query->orderBy('e.ordering', 'ASC');
}
}