mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
Merge remote-tracking branch 'origin/master' into rector/rules-up-to-php80
Conflicts: src/Bundle/ChillActivityBundle/Controller/ActivityController.php src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/DateAggregator.php src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php src/Bundle/ChillCalendarBundle/Command/MapAndSubscribeUserCalendarCommand.php src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSGraphUserRepository.php src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php src/Bundle/ChillEventBundle/Search/EventSearch.php src/Bundle/ChillMainBundle/Controller/ExportController.php src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php src/Bundle/ChillMainBundle/Cron/CronManager.php src/Bundle/ChillMainBundle/Entity/CronJobExecution.php src/Bundle/ChillMainBundle/Export/ExportManager.php src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php src/Bundle/ChillMainBundle/Form/Type/Listing/FilterOrderType.php src/Bundle/ChillMainBundle/Repository/NotificationRepository.php src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactory.php src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodVoter.php src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkEvaluationContext.php src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContext.php src/Bundle/ChillReportBundle/DataFixtures/ORM/LoadReports.php src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php
This commit is contained in:
@@ -48,12 +48,19 @@ class Center implements HasCenterInterface, \Stringable
|
||||
*/
|
||||
private string $name = '';
|
||||
|
||||
/**
|
||||
* @var Collection<Regroupment>
|
||||
* @ORM\ManyToMany(targetEntity=Regroupment::class, mappedBy="centers")
|
||||
*/
|
||||
private Collection $regroupments;
|
||||
|
||||
/**
|
||||
* Center constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->groupCenters = new \Doctrine\Common\Collections\ArrayCollection();
|
||||
$this->groupCenters = new ArrayCollection();
|
||||
$this->regroupments = new ArrayCollection();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -106,6 +113,14 @@ class Center implements HasCenterInterface, \Stringable
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<Regroupment>
|
||||
*/
|
||||
public function getRegroupments(): Collection
|
||||
{
|
||||
return $this->regroupments;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
*
|
||||
|
@@ -25,7 +25,12 @@ class CronJobExecution
|
||||
public const SUCCESS = 1;
|
||||
|
||||
/**
|
||||
* @var DateTimeImmutable
|
||||
* @ORM\Column(type="text", nullable=false)
|
||||
* @ORM\Id
|
||||
*/
|
||||
private string $key;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null})
|
||||
*/
|
||||
private ?DateTimeImmutable $lastEnd = null;
|
||||
@@ -40,12 +45,14 @@ class CronJobExecution
|
||||
*/
|
||||
private ?int $lastStatus = null;
|
||||
|
||||
public function __construct(/**
|
||||
* @ORM\Column(type="text", nullable=false)
|
||||
* @ORM\Id
|
||||
/**
|
||||
* @ORM\Column(type="json", options={"default": "'{}'::jsonb", "jsonb": true})
|
||||
*/
|
||||
private string $key
|
||||
) {
|
||||
private array $lastExecutionData = [];
|
||||
|
||||
public function __construct(string $key)
|
||||
{
|
||||
$this->key = $key;
|
||||
$this->lastStart = new DateTimeImmutable('now');
|
||||
}
|
||||
|
||||
@@ -89,4 +96,16 @@ class CronJobExecution
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLastExecutionData(): array
|
||||
{
|
||||
return $this->lastExecutionData;
|
||||
}
|
||||
|
||||
public function setLastExecutionData(array $lastExecutionData): CronJobExecution
|
||||
{
|
||||
$this->lastExecutionData = $lastExecutionData;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
|
@@ -22,11 +22,12 @@ use Doctrine\ORM\Mapping as ORM;
|
||||
class Regroupment
|
||||
{
|
||||
/**
|
||||
* @var Center
|
||||
* @ORM\ManyToMany(
|
||||
* targetEntity=Center::class
|
||||
* targetEntity=Center::class,
|
||||
* inversedBy="regroupments"
|
||||
* )
|
||||
* @ORM\Id
|
||||
* @var Collection<Center>
|
||||
*/
|
||||
private Collection $centers;
|
||||
|
||||
@@ -52,6 +53,26 @@ class Regroupment
|
||||
$this->centers = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function addCenter(Center $center): self
|
||||
{
|
||||
if (!$this->centers->contains($center)) {
|
||||
$this->centers->add($center);
|
||||
$center->getRegroupments()->add($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeCenter(Center $center): self
|
||||
{
|
||||
if ($this->centers->contains($center)) {
|
||||
$this->centers->removeElement($center);
|
||||
$center->getRegroupments()->removeElement($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCenters(): Collection
|
||||
{
|
||||
return $this->centers;
|
||||
|
@@ -502,11 +502,11 @@ class User implements UserInterface, \Stringable
|
||||
*
|
||||
* @return User
|
||||
*/
|
||||
public function setUsername($name)
|
||||
public function setUsername(?string $name)
|
||||
{
|
||||
$this->username = $name;
|
||||
$this->username = (string) $name;
|
||||
|
||||
if (empty($this->getLabel())) {
|
||||
if ("" === trim($this->getLabel())) {
|
||||
$this->setLabel($name);
|
||||
}
|
||||
|
||||
|
@@ -37,7 +37,7 @@ class UserJob
|
||||
protected ?int $id = null;
|
||||
|
||||
/**
|
||||
* @var array|string[]A
|
||||
* @var array<string, string>
|
||||
* @ORM\Column(name="label", type="json")
|
||||
* @Serializer\Groups({"read", "docgen:read"})
|
||||
* @Serializer\Context({"is-translatable": true}, groups={"docgen:read"})
|
||||
|
Reference in New Issue
Block a user