Merge remote-tracking branch 'origin/master' into 616_rapid-action

This commit is contained in:
2024-06-12 16:45:43 +02:00
2249 changed files with 42970 additions and 30730 deletions

View File

@@ -25,20 +25,14 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface
{
protected Registry $registry;
protected Security $security;
/**
* @var TranslatorInterface
*/
protected $translator;
public function __construct(TranslatorInterface $translator, Registry $registry, Security $security)
public function __construct(TranslatorInterface $translator, protected Registry $registry, protected Security $security)
{
$this->translator = $translator;
$this->registry = $registry;
$this->security = $security;
}
public function buildMenu($menuId, MenuItem $menu, array $parameters): void

View File

@@ -24,12 +24,9 @@ class HouseholdMenuBuilder implements LocalMenuBuilderInterface
*/
protected $translator;
private Security $security;
public function __construct(TranslatorInterface $translator, Security $security)
public function __construct(TranslatorInterface $translator, private readonly Security $security)
{
$this->translator = $translator;
$this->security = $security;
}
public function buildMenu($menuId, MenuItem $menu, array $parameters): void
@@ -63,7 +60,7 @@ class HouseholdMenuBuilder implements LocalMenuBuilderInterface
'route' => 'chill_person_household_accompanying_period',
'routeParameters' => [
'household_id' => $household->getId(),
],])
], ])
->setExtras(['order' => 20]);
}

View File

@@ -20,7 +20,6 @@ use Knp\Menu\MenuItem;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
use Symfony\Component\Security\Core\Security;
use Symfony\Contracts\Translation\TranslatorInterface;
use function count;
/**
* Add menu entrie to person menu.
@@ -39,28 +38,18 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
*/
protected $showAccompanyingPeriod;
protected TranslatorInterface $translator;
private ResidentialAddressRepository $residentialAddressRepo;
private Security $security;
public function __construct(
ParameterBagInterface $parameterBag,
Security $security,
TranslatorInterface $translator,
ResidentialAddressRepository $residentialAddressRepo
private readonly Security $security,
protected TranslatorInterface $translator,
private readonly ResidentialAddressRepository $residentialAddressRepo
) {
$this->showAccompanyingPeriod = $parameterBag->get('chill_person.accompanying_period');
$this->security = $security;
$this->translator = $translator;
$this->residentialAddressRepo = $residentialAddressRepo;
}
/**
* @param $menuId
* @param MenuItem $menu
* @param array{person: Person} $parameters
*
* @return void
*/
public function buildMenu($menuId, MenuItem $menu, array $parameters)

View File

@@ -25,25 +25,13 @@ use Symfony\Contracts\Translation\TranslatorInterface;
*/
class SectionMenuBuilder implements LocalMenuBuilderInterface
{
protected ParameterBagInterface $parameterBag;
protected TranslatorInterface $translator;
private Security $security;
/**
* SectionMenuBuilder constructor.
*/
public function __construct(ParameterBagInterface $parameterBag, Security $security, TranslatorInterface $translator)
public function __construct(protected ParameterBagInterface $parameterBag, private readonly Security $security, protected TranslatorInterface $translator)
{
$this->parameterBag = $parameterBag;
$this->security = $security;
$this->translator = $translator;
}
/**
* @param $menuId
*/
public function buildMenu($menuId, MenuItem $menu, array $parameters)
{
if ($this->security->isGranted(PersonVoter::CREATE) && $this->parameterBag->get('chill_person.create_person_allowed')) {