admin: missing translations and css class

This commit is contained in:
nobohan
2022-05-11 11:30:08 +02:00
parent 97fd9c557c
commit 629dbb9137
24 changed files with 56 additions and 44 deletions

View File

@@ -21,9 +21,9 @@ use Chill\MainBundle\Form\UserType;
use Chill\MainBundle\Pagination\PaginatorInterface;
use Chill\MainBundle\Templating\Listing\FilterOrderHelper;
use Chill\MainBundle\Templating\Listing\FilterOrderHelperFactoryInterface;
use LogicException;
use Psr\Log\LoggerInterface;
use RuntimeException;
use LogicException;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Symfony\Component\Form\Form;
use Symfony\Component\Form\FormInterface;
@@ -38,14 +38,14 @@ class UserController extends CRUDController
{
public const FORM_GROUP_CENTER_COMPOSED = 'composed_groupcenter';
private FilterOrderHelperFactoryInterface $filterOrderHelperFactory;
private LoggerInterface $logger;
private UserPasswordEncoderInterface $passwordEncoder;
private ValidatorInterface $validator;
private FilterOrderHelperFactoryInterface $filterOrderHelperFactory;
public function __construct(
LoggerInterface $chillLogger,
ValidatorInterface $validator,
@@ -58,25 +58,6 @@ class UserController extends CRUDController
$this->filterOrderHelperFactory = $filterOrderHelperFactory;
}
protected function buildFilterOrderHelper(string $action, Request $request): ?FilterOrderHelper
{
return $this->getFilterOrderHelperFactory()
->create(self::class)
->addSearchBox(['label'])
->build();
}
protected function countEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null): int
{
if (null === $filterOrder) {
throw new LogicException('filterOrder should not be null');
}
$count = parent::countEntities($action, $request, $filterOrder);
return $count;
}
/**
* @Route("/{_locale}/admin/main/user/{uid}/add_link_groupcenter",
* name="admin_user_add_groupcenter")
@@ -241,6 +222,23 @@ class UserController extends CRUDController
]);
}
protected function buildFilterOrderHelper(string $action, Request $request): ?FilterOrderHelper
{
return $this->getFilterOrderHelperFactory()
->create(self::class)
->addSearchBox(['label'])
->build();
}
protected function countEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null): int
{
if (null === $filterOrder) {
throw new LogicException('filterOrder should not be null');
}
return parent::countEntities($action, $request, $filterOrder);
}
protected function createFormFor(string $action, $entity, ?string $formClass = null, array $formOptions = []): FormInterface
{
// for "new", add special config