mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 04:53:49 +00:00
Merge branch 'master' into upgrade-sf5
This commit is contained in:
@@ -13,4 +13,6 @@ namespace Chill\AsideActivityBundle;
|
||||
|
||||
use Symfony\Component\HttpKernel\Bundle\Bundle;
|
||||
|
||||
class ChillAsideActivityBundle extends Bundle {}
|
||||
class ChillAsideActivityBundle extends Bundle
|
||||
{
|
||||
}
|
||||
|
@@ -22,7 +22,9 @@ use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||
|
||||
final class AsideActivityController extends CRUDController
|
||||
{
|
||||
public function __construct(private readonly AsideActivityCategoryRepository $categoryRepository, private readonly ChillSecurity $security) {}
|
||||
public function __construct(private readonly AsideActivityCategoryRepository $categoryRepository)
|
||||
{
|
||||
}
|
||||
|
||||
public function createEntity(string $action, Request $request): object
|
||||
{
|
||||
@@ -53,7 +55,7 @@ final class AsideActivityController extends CRUDController
|
||||
return $asideActivity;
|
||||
}
|
||||
|
||||
protected function buildQueryEntities(string $action, Request $request, FilterOrderHelper $filterOrder = null)
|
||||
protected function buildQueryEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null)
|
||||
{
|
||||
$qb = parent::buildQueryEntities($action, $request);
|
||||
|
||||
|
@@ -20,7 +20,9 @@ use Doctrine\Persistence\ObjectManager;
|
||||
|
||||
class LoadAsideActivity extends Fixture implements DependentFixtureInterface
|
||||
{
|
||||
public function __construct(private readonly UserRepository $userRepository) {}
|
||||
public function __construct(private readonly UserRepository $userRepository)
|
||||
{
|
||||
}
|
||||
|
||||
public function getDependencies(): array
|
||||
{
|
||||
|
@@ -32,7 +32,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
|
||||
*
|
||||
* @Assert\NotBlank
|
||||
*/
|
||||
private \Chill\MainBundle\Entity\User $agent;
|
||||
private User $agent;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime")
|
||||
@@ -44,7 +44,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
|
||||
*
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
private \Chill\MainBundle\Entity\User $createdBy;
|
||||
private User $createdBy;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime")
|
||||
@@ -82,7 +82,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
|
||||
*
|
||||
* @ORM\JoinColumn(nullable=false)
|
||||
*/
|
||||
private ?\Chill\AsideActivityBundle\Entity\AsideActivityCategory $type = null;
|
||||
private ?AsideActivityCategory $type = null;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime", nullable=true)
|
||||
@@ -92,7 +92,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface
|
||||
/**
|
||||
* @ORM\ManyToOne(targetEntity=User::class)
|
||||
*/
|
||||
private \Chill\MainBundle\Entity\User $updatedBy;
|
||||
private User $updatedBy;
|
||||
|
||||
public function getAgent(): ?User
|
||||
{
|
||||
|
@@ -23,7 +23,8 @@ class ByActivityTypeAggregator implements AggregatorInterface
|
||||
public function __construct(
|
||||
private readonly AsideActivityCategoryRepository $asideActivityCategoryRepository,
|
||||
private readonly TranslatableStringHelper $translatableStringHelper
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@@ -19,7 +19,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ByLocationAggregator implements AggregatorInterface
|
||||
{
|
||||
public function __construct(private readonly LocationRepository $locationRepository) {}
|
||||
public function __construct(private readonly LocationRepository $locationRepository)
|
||||
{
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder): void
|
||||
{
|
||||
|
@@ -27,7 +27,8 @@ class ByUserJobAggregator implements AggregatorInterface
|
||||
public function __construct(
|
||||
private readonly UserJobRepositoryInterface $userJobRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
@@ -65,7 +66,9 @@ class ByUserJobAggregator implements AggregatorInterface
|
||||
return Declarations::ASIDE_ACTIVITY_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@@ -27,7 +27,8 @@ class ByUserScopeAggregator implements AggregatorInterface
|
||||
public function __construct(
|
||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
@@ -64,7 +65,9 @@ class ByUserScopeAggregator implements AggregatorInterface
|
||||
return Declarations::ASIDE_ACTIVITY_TYPE;
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@@ -22,9 +22,13 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class AvgAsideActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
{
|
||||
public function __construct(private readonly AsideActivityRepository $repository) {}
|
||||
public function __construct(private readonly AsideActivityRepository $repository)
|
||||
{
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@@ -22,9 +22,13 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class CountAsideActivity implements ExportInterface, GroupedExportInterface
|
||||
{
|
||||
public function __construct(private readonly AsideActivityRepository $repository) {}
|
||||
public function __construct(private readonly AsideActivityRepository $repository)
|
||||
{
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@@ -42,9 +42,12 @@ final readonly class ListAsideActivity implements ListInterface, GroupedExportIn
|
||||
private CategoryRender $categoryRender,
|
||||
private LocationRepository $locationRepository,
|
||||
private TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@@ -22,9 +22,13 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class SumAsideActivityDuration implements ExportInterface, GroupedExportInterface
|
||||
{
|
||||
public function __construct(private readonly AsideActivityRepository $repository) {}
|
||||
public function __construct(private readonly AsideActivityRepository $repository)
|
||||
{
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder) {}
|
||||
public function buildForm(FormBuilderInterface $builder)
|
||||
{
|
||||
}
|
||||
|
||||
public function getFormDefaultData(): array
|
||||
{
|
||||
|
@@ -28,7 +28,8 @@ class ByActivityTypeFilter implements FilterInterface
|
||||
private readonly CategoryRender $categoryRender,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
private readonly AsideActivityCategoryRepository $asideActivityTypeRepository
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@@ -22,7 +22,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class ByDateFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, protected TranslatorInterface $translator) {}
|
||||
public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, protected TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@@ -25,7 +25,8 @@ final readonly class ByLocationFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(
|
||||
private Security $security
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
{
|
||||
|
@@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class ByUserFilter implements FilterInterface
|
||||
{
|
||||
public function __construct(private readonly UserRender $userRender) {}
|
||||
public function __construct(private readonly UserRender $userRender)
|
||||
{
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@@ -28,7 +28,8 @@ class ByUserJobFilter implements FilterInterface
|
||||
|
||||
public function __construct(
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@@ -30,7 +30,8 @@ class ByUserScopeFilter implements FilterInterface
|
||||
public function __construct(
|
||||
private readonly ScopeRepositoryInterface $scopeRepository,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function addRole(): ?string
|
||||
{
|
||||
|
@@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
final class AsideActivityCategoryType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly CategoryRender $categoryRender) {}
|
||||
public function __construct(private readonly CategoryRender $categoryRender)
|
||||
{
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
|
@@ -20,7 +20,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
final class PickAsideActivityCategoryType extends AbstractType
|
||||
{
|
||||
public function __construct(private readonly CategoryRender $categoryRender) {}
|
||||
public function __construct(private readonly CategoryRender $categoryRender)
|
||||
{
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver)
|
||||
{
|
||||
|
@@ -16,7 +16,9 @@ use Symfony\Component\Security\Core\Security;
|
||||
|
||||
final readonly class AdminMenuBuilder implements \Chill\MainBundle\Routing\LocalMenuBuilderInterface
|
||||
{
|
||||
public function __construct(private Security $security) {}
|
||||
public function __construct(private Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
{
|
||||
|
@@ -21,7 +21,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
*/
|
||||
class SectionMenuBuilder implements LocalMenuBuilderInterface
|
||||
{
|
||||
public function __construct(protected TranslatorInterface $translator, public AuthorizationCheckerInterface $authorizationChecker) {}
|
||||
public function __construct(protected TranslatorInterface $translator, public AuthorizationCheckerInterface $authorizationChecker)
|
||||
{
|
||||
}
|
||||
|
||||
public function buildMenu($menuId, MenuItem $menu, array $parameters)
|
||||
{
|
||||
|
@@ -49,7 +49,7 @@ class AsideActivityCategoryRepository implements ObjectRepository
|
||||
*
|
||||
* @return AsideActivityCategory[]
|
||||
*/
|
||||
public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array
|
||||
public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array
|
||||
{
|
||||
return $this->repository->findBy($criteria, $orderBy, $limit, $offset);
|
||||
}
|
||||
|
@@ -26,7 +26,9 @@ final readonly class CategoryRender implements ChillEntityRenderInterface
|
||||
|
||||
public const SEPERATOR_KEY = 'default.separator';
|
||||
|
||||
public function __construct(private TranslatableStringHelper $translatableStringHelper, private \Twig\Environment $engine) {}
|
||||
public function __construct(private TranslatableStringHelper $translatableStringHelper, private \Twig\Environment $engine)
|
||||
{
|
||||
}
|
||||
|
||||
public function buildParents(AsideActivityCategory $asideActivityCategory)
|
||||
{
|
||||
|
Reference in New Issue
Block a user