mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
44 lines
889 B
PHP
44 lines
889 B
PHP
<?php
|
|
|
|
namespace Chill\MainBundle\Controller;
|
|
|
|
use Chill\MainBundle\CRUD\Controller\CRUDController;
|
|
use Chill\MainBundle\Entity\Country;
|
|
use Chill\MainBundle\Pagination\PaginatorFactory;
|
|
|
|
/**
|
|
*
|
|
*
|
|
*/
|
|
class AdminCountryCRUDController extends CRUDController
|
|
{
|
|
|
|
function __construct(PaginatorFactory $paginator)
|
|
{
|
|
$this->paginatorFactory = $paginator;
|
|
}
|
|
|
|
protected function getEntity(): string
|
|
{
|
|
return Country::class;
|
|
}
|
|
|
|
protected function orderingOptions(): array
|
|
{
|
|
return [
|
|
'countryCode' => 'ASC'
|
|
];
|
|
}
|
|
|
|
protected function getTemplateParameters($action): array
|
|
{
|
|
switch ($action) {
|
|
case 'index':
|
|
return [
|
|
'columns' => [ 'countryCode', 'name' ],
|
|
'title' => 'Liste des pays'
|
|
];
|
|
}
|
|
}
|
|
}
|