mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-10-04 04:19:43 +00:00
Remove no longer used annotation use statements and replace with attribute use statements
This commit is contained in:
@@ -75,7 +75,7 @@ final class ActivityController extends AbstractController
|
|||||||
* Deletes a Activity entity.
|
* Deletes a Activity entity.
|
||||||
*/
|
*/
|
||||||
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/activity/{id}/delete', name: 'chill_activity_activity_delete', methods: ['GET', 'POST', 'DELETE'])]
|
#[\Symfony\Component\Routing\Attribute\Route(path: '/{_locale}/activity/{id}/delete', name: 'chill_activity_activity_delete', methods: ['GET', 'POST', 'DELETE'])]
|
||||||
public function deleteAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
public function deleteAction(Request $request, mixed $id): \Symfony\Component\HttpFoundation\RedirectResponse|Response
|
||||||
{
|
{
|
||||||
$view = null;
|
$view = null;
|
||||||
|
|
||||||
|
@@ -22,7 +22,7 @@ use function is_int;
|
|||||||
*/
|
*/
|
||||||
class Configuration implements ConfigurationInterface
|
class Configuration implements ConfigurationInterface
|
||||||
{
|
{
|
||||||
public function getConfigTreeBuilder(): \Symfony\Component\Config\Definition\Builder\TreeBuilder
|
public function getConfigTreeBuilder(): TreeBuilder
|
||||||
{
|
{
|
||||||
$treeBuilder = new TreeBuilder('chill_activity');
|
$treeBuilder = new TreeBuilder('chill_activity');
|
||||||
$rootNode = $treeBuilder->getRootNode();
|
$rootNode = $treeBuilder->getRootNode();
|
||||||
|
@@ -34,9 +34,9 @@ use Chill\ThirdPartyBundle\Entity\ThirdParty;
|
|||||||
use Doctrine\Common\Collections\ArrayCollection;
|
use Doctrine\Common\Collections\ArrayCollection;
|
||||||
use Doctrine\Common\Collections\Collection;
|
use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Annotation\DiscriminatorMap;
|
use Symfony\Component\Serializer\Attribute\DiscriminatorMap;
|
||||||
use Symfony\Component\Serializer\Annotation\Groups;
|
use Symfony\Component\Serializer\Attribute\Groups;
|
||||||
use Symfony\Component\Serializer\Annotation\SerializedName;
|
use Symfony\Component\Serializer\Attribute\SerializedName;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -12,7 +12,7 @@ declare(strict_types=1);
|
|||||||
namespace Chill\ActivityBundle\Entity;
|
namespace Chill\ActivityBundle\Entity;
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ActivityPresence.
|
* Class ActivityPresence.
|
||||||
|
@@ -37,8 +37,6 @@ class ActivityReason
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get active.
|
* Get active.
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
*/
|
||||||
public function getActive(): bool
|
public function getActive(): bool
|
||||||
{
|
{
|
||||||
@@ -55,8 +53,6 @@ class ActivityReason
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id.
|
* Get id.
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
*/
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
{
|
{
|
||||||
|
@@ -58,8 +58,6 @@ class ActivityReasonCategory implements \Stringable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get active.
|
* Get active.
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
*/
|
||||||
public function getActive(): bool
|
public function getActive(): bool
|
||||||
{
|
{
|
||||||
@@ -68,8 +66,6 @@ class ActivityReasonCategory implements \Stringable
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id.
|
* Get id.
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
*/
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
{
|
{
|
||||||
|
@@ -12,8 +12,8 @@ declare(strict_types=1);
|
|||||||
namespace Chill\ActivityBundle\Entity;
|
namespace Chill\ActivityBundle\Entity;
|
||||||
|
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||||
use Symfony\Component\Serializer\Annotation\Groups;
|
use Symfony\Component\Serializer\Attribute\Groups;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
use Symfony\Component\Validator\Context\ExecutionContextInterface;
|
||||||
|
|
||||||
|
@@ -36,9 +36,6 @@ class ActivityReasonCategoryType extends AbstractType
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getBlockPrefix(): string
|
public function getBlockPrefix(): string
|
||||||
{
|
{
|
||||||
return 'chill_activitybundle_activityreasoncategory';
|
return 'chill_activitybundle_activityreasoncategory';
|
||||||
|
@@ -36,9 +36,6 @@ class ActivityReasonType extends AbstractType
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getBlockPrefix(): string
|
public function getBlockPrefix(): string
|
||||||
{
|
{
|
||||||
return 'chill_activitybundle_activityreason';
|
return 'chill_activitybundle_activityreason';
|
||||||
|
@@ -22,10 +22,8 @@ trait PrepareActivityTrait
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Return an activity with a scope and a person inside.
|
* Return an activity with a scope and a person inside.
|
||||||
*
|
|
||||||
* @return Activity
|
|
||||||
*/
|
*/
|
||||||
public function prepareActivity(Scope $scope, Person $person): \Chill\ActivityBundle\Entity\Activity
|
public function prepareActivity(Scope $scope, Person $person): Activity
|
||||||
{
|
{
|
||||||
return (new Activity())
|
return (new Activity())
|
||||||
->setScope($scope)
|
->setScope($scope)
|
||||||
|
@@ -41,7 +41,7 @@ class ByActivityTypeAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class);
|
$this->translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ACPAggregators\ByActivityTypeAggregator
|
public function getAggregator(): ByActivityTypeAggregator
|
||||||
{
|
{
|
||||||
return new ByActivityTypeAggregator(
|
return new ByActivityTypeAggregator(
|
||||||
$this->rollingDateConverter,
|
$this->rollingDateConverter,
|
||||||
|
@@ -32,7 +32,7 @@ final class BySocialActionAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get('chill.activity.export.bysocialaction_aggregator');
|
$this->aggregator = self::getContainer()->get('chill.activity.export.bysocialaction_aggregator');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ACPAggregators\BySocialActionAggregator
|
public function getAggregator(): BySocialActionAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ final class BySocialIssueAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get('chill.activity.export.bysocialissue_aggregator');
|
$this->aggregator = self::getContainer()->get('chill.activity.export.bysocialissue_aggregator');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ACPAggregators\BySocialIssueAggregator
|
public function getAggregator(): BySocialIssueAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -35,7 +35,7 @@ class ActivityPresenceAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->activityPresenceRepository = self::getContainer()->get(ActivityPresenceRepositoryInterface::class);
|
$this->activityPresenceRepository = self::getContainer()->get(ActivityPresenceRepositoryInterface::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ActivityPresenceAggregator
|
public function getAggregator(): ActivityPresenceAggregator
|
||||||
{
|
{
|
||||||
return new ActivityPresenceAggregator($this->activityPresenceRepository, $this->translatableStringHelper);
|
return new ActivityPresenceAggregator($this->activityPresenceRepository, $this->translatableStringHelper);
|
||||||
}
|
}
|
||||||
|
@@ -44,7 +44,7 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest
|
|||||||
->push($request->reveal());*/
|
->push($request->reveal());*/
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ActivityReasonAggregator
|
public function getAggregator(): ActivityReasonAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -45,7 +45,7 @@ final class ActivityTypeAggregatorTest extends AbstractAggregatorTest
|
|||||||
->push($request->reveal());
|
->push($request->reveal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ActivityTypeAggregator
|
public function getAggregator(): ActivityTypeAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -45,7 +45,7 @@ final class ActivityUserAggregatorTest extends AbstractAggregatorTest
|
|||||||
->push($request->reveal());
|
->push($request->reveal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ActivityUserAggregator
|
public function getAggregator(): ActivityUserAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ final class ByThirdpartyAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get(ByThirdpartyAggregator::class);
|
$this->aggregator = self::getContainer()->get(ByThirdpartyAggregator::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ByThirdpartyAggregator
|
public function getAggregator(): ByThirdpartyAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ final class ByUserAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get(ByCreatorAggregator::class);
|
$this->aggregator = self::getContainer()->get(ByCreatorAggregator::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\ByCreatorAggregator
|
public function getAggregator(): ByCreatorAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ final class CreatorJobAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get(CreatorJobAggregator::class);
|
$this->aggregator = self::getContainer()->get(CreatorJobAggregator::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\CreatorJobAggregator
|
public function getAggregator(): CreatorJobAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ final class CreatorScopeAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get(CreatorScopeAggregator::class);
|
$this->aggregator = self::getContainer()->get(CreatorScopeAggregator::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\CreatorScopeAggregator
|
public function getAggregator(): CreatorScopeAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ final class DateAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get(DateAggregator::class);
|
$this->aggregator = self::getContainer()->get(DateAggregator::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\DateAggregator
|
public function getAggregator(): DateAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get(LocationTypeAggregator::class);
|
$this->aggregator = self::getContainer()->get(LocationTypeAggregator::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\LocationTypeAggregator
|
public function getAggregator(): LocationTypeAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ class PersonAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->labelPersonHelper = self::getContainer()->get(LabelPersonHelper::class);
|
$this->labelPersonHelper = self::getContainer()->get(LabelPersonHelper::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\PersonAggregators\PersonAggregator
|
public function getAggregator(): PersonAggregator
|
||||||
{
|
{
|
||||||
return new PersonAggregator($this->labelPersonHelper);
|
return new PersonAggregator($this->labelPersonHelper);
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@ class PersonsAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->labelPersonHelper = self::getContainer()->get(LabelPersonHelper::class);
|
$this->labelPersonHelper = self::getContainer()->get(LabelPersonHelper::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\ActivityBundle\Export\Aggregator\PersonsAggregator
|
public function getAggregator(): PersonsAggregator
|
||||||
{
|
{
|
||||||
return new PersonsAggregator($this->labelPersonHelper);
|
return new PersonsAggregator($this->labelPersonHelper);
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@ final class ByCreatorFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get(ByCreatorFilter::class);
|
$this->filter = self::getContainer()->get(ByCreatorFilter::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\ByCreatorFilter
|
public function getFilter(): ByCreatorFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -34,7 +34,7 @@ final class BySocialIssueFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get(BySocialIssueFilter::class);
|
$this->filter = self::getContainer()->get(BySocialIssueFilter::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\ACPFilters\BySocialIssueFilter
|
public function getFilter(): BySocialIssueFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@ final class ActivityDateFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get(ActivityDateFilter::class);
|
$this->filter = self::getContainer()->get(ActivityDateFilter::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\ActivityDateFilter
|
public function getFilter(): ActivityDateFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,7 @@ class ActivityPresenceFilterTest extends AbstractFilterTest
|
|||||||
$this->translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class);
|
$this->translatableStringHelper = self::getContainer()->get(TranslatableStringHelperInterface::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\ActivityPresenceFilter
|
public function getFilter(): ActivityPresenceFilter
|
||||||
{
|
{
|
||||||
return new ActivityPresenceFilter($this->translatableStringHelper, $this->translator);
|
return new ActivityPresenceFilter($this->translatableStringHelper, $this->translator);
|
||||||
}
|
}
|
||||||
|
@@ -44,7 +44,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest
|
|||||||
->push($request->reveal());
|
->push($request->reveal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\PersonFilters\ActivityReasonFilter
|
public function getFilter(): ActivityReasonFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -34,7 +34,7 @@ final class ActivityTypeFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get('chill.activity.export.type_filter');
|
$this->filter = self::getContainer()->get('chill.activity.export.type_filter');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\ActivityTypeFilter
|
public function getFilter(): ActivityTypeFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@ final class ByCreatorFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get(ByCreatorFilter::class);
|
$this->filter = self::getContainer()->get(ByCreatorFilter::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\ByCreatorFilter
|
public function getFilter(): ByCreatorFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -42,7 +42,7 @@ class CreatorJobFilterTest extends AbstractFilterTest
|
|||||||
$this->userJobRepository = self::getContainer()->get(UserJobRepositoryInterface::class);
|
$this->userJobRepository = self::getContainer()->get(UserJobRepositoryInterface::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\CreatorJobFilter
|
public function getFilter(): CreatorJobFilter
|
||||||
{
|
{
|
||||||
return new CreatorJobFilter(
|
return new CreatorJobFilter(
|
||||||
$this->translatableStringHelper,
|
$this->translatableStringHelper,
|
||||||
|
@@ -33,7 +33,7 @@ final class CreatorScopeFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get(CreatorScopeFilter::class);
|
$this->filter = self::getContainer()->get(CreatorScopeFilter::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\CreatorScopeFilter
|
public function getFilter(): CreatorScopeFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ final class EmergencyFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get(EmergencyFilter::class);
|
$this->filter = self::getContainer()->get(EmergencyFilter::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\EmergencyFilter
|
public function getFilter(): EmergencyFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@ final class LocationTypeFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get(LocationTypeFilter::class);
|
$this->filter = self::getContainer()->get(LocationTypeFilter::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\LocationTypeFilter
|
public function getFilter(): LocationTypeFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -34,7 +34,7 @@ final class ActivityReasonFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get('chill.activity.export.reason_filter');
|
$this->filter = self::getContainer()->get('chill.activity.export.reason_filter');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\PersonFilters\ActivityReasonFilter
|
public function getFilter(): ActivityReasonFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get('chill.activity.export.person_having_an_activity_between_date_filter');
|
$this->filter = self::getContainer()->get('chill.activity.export.person_having_an_activity_between_date_filter');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\PersonFilters\PersonHavingActivityBetweenDateFilter
|
public function getFilter(): PersonHavingActivityBetweenDateFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -43,7 +43,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest
|
|||||||
->push($request->reveal());
|
->push($request->reveal());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\PersonFilters\PersonHavingActivityBetweenDateFilter
|
public function getFilter(): PersonHavingActivityBetweenDateFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -34,7 +34,7 @@ class PersonsFilterTest extends AbstractFilterTest
|
|||||||
$this->personRender = self::getContainer()->get(PersonRenderInterface::class);
|
$this->personRender = self::getContainer()->get(PersonRenderInterface::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\PersonsFilter
|
public function getFilter(): PersonsFilter
|
||||||
{
|
{
|
||||||
return new PersonsFilter($this->personRender);
|
return new PersonsFilter($this->personRender);
|
||||||
}
|
}
|
||||||
|
@@ -32,7 +32,7 @@ final class SentReceivedFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get(SentReceivedFilter::class);
|
$this->filter = self::getContainer()->get(SentReceivedFilter::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\SentReceivedFilter
|
public function getFilter(): SentReceivedFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@ final class UserFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get(UserFilter::class);
|
$this->filter = self::getContainer()->get(UserFilter::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\ActivityBundle\Export\Filter\UserFilter
|
public function getFilter(): UserFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -47,9 +47,6 @@ final class TranslatableActivityReasonTest extends TypeTestCase
|
|||||||
$this->markTestSkipped('See issue 651');
|
$this->markTestSkipped('See issue 651');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Symfony\Bridge\Doctrine\Form\Type\EntityType
|
|
||||||
*/
|
|
||||||
protected function getEntityType(): \Symfony\Bridge\Doctrine\Form\Type\EntityType
|
protected function getEntityType(): \Symfony\Bridge\Doctrine\Form\Type\EntityType
|
||||||
{
|
{
|
||||||
$managerRegistry = (new \Prophecy\Prophet())->prophesize();
|
$managerRegistry = (new \Prophecy\Prophet())->prophesize();
|
||||||
@@ -71,13 +68,11 @@ final class TranslatableActivityReasonTest extends TypeTestCase
|
|||||||
/**
|
/**
|
||||||
* @param string $locale
|
* @param string $locale
|
||||||
* @param string $fallbackLocale
|
* @param string $fallbackLocale
|
||||||
*
|
|
||||||
* @return TranslatableStringHelper
|
|
||||||
*/
|
*/
|
||||||
protected function getTranslatableStringHelper(
|
protected function getTranslatableStringHelper(
|
||||||
$locale = 'en',
|
$locale = 'en',
|
||||||
$fallbackLocale = 'en',
|
$fallbackLocale = 'en',
|
||||||
): \Chill\MainBundle\Templating\TranslatableStringHelper {
|
): TranslatableStringHelper {
|
||||||
$prophet = new \Prophecy\Prophet();
|
$prophet = new \Prophecy\Prophet();
|
||||||
$requestStack = $prophet->prophesize();
|
$requestStack = $prophet->prophesize();
|
||||||
$request = $prophet->prophesize();
|
$request = $prophet->prophesize();
|
||||||
|
@@ -19,7 +19,6 @@ use Chill\MainBundle\Entity\User;
|
|||||||
use Chill\MainBundle\Test\PrepareCenterTrait;
|
use Chill\MainBundle\Test\PrepareCenterTrait;
|
||||||
use Chill\MainBundle\Test\PrepareScopeTrait;
|
use Chill\MainBundle\Test\PrepareScopeTrait;
|
||||||
use Chill\MainBundle\Test\PrepareUserTrait;
|
use Chill\MainBundle\Test\PrepareUserTrait;
|
||||||
use Chill\PersonBundle\Security\Authorization\PersonVoter;
|
|
||||||
use Chill\PersonBundle\Test\PreparePersonTrait;
|
use Chill\PersonBundle\Test\PreparePersonTrait;
|
||||||
use Prophecy\Prophet;
|
use Prophecy\Prophet;
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
|
||||||
|
@@ -41,7 +41,7 @@ class TimelineActivityProvider implements TimelineProviderInterface
|
|||||||
$this->user = $storage->getToken()->getUser();
|
$this->user = $storage->getToken()->getUser();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function fetchQuery($context, array $args): \Chill\MainBundle\Timeline\TimelineSingleQuery
|
public function fetchQuery($context, array $args): TimelineSingleQuery
|
||||||
{
|
{
|
||||||
if ('center' === $context) {
|
if ('center' === $context) {
|
||||||
return TimelineSingleQuery::fromArray($this->aclAwareRepository
|
return TimelineSingleQuery::fromArray($this->aclAwareRepository
|
||||||
|
@@ -12,7 +12,6 @@ declare(strict_types=1);
|
|||||||
namespace Chill\AsideActivityBundle\Controller;
|
namespace Chill\AsideActivityBundle\Controller;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AdminController.
|
* Class AdminController.
|
||||||
|
@@ -16,7 +16,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
|
|||||||
|
|
||||||
class Configuration implements ConfigurationInterface
|
class Configuration implements ConfigurationInterface
|
||||||
{
|
{
|
||||||
public function getConfigTreeBuilder(): \Symfony\Component\Config\Definition\Builder\TreeBuilder
|
public function getConfigTreeBuilder(): TreeBuilder
|
||||||
{
|
{
|
||||||
$treeBuilder = new TreeBuilder('chill_aside_activity');
|
$treeBuilder = new TreeBuilder('chill_aside_activity');
|
||||||
|
|
||||||
|
@@ -12,7 +12,6 @@ declare(strict_types=1);
|
|||||||
namespace Chill\BudgetBundle\Controller\Admin;
|
namespace Chill\BudgetBundle\Controller\Admin;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
|
|
||||||
class AdminController extends AbstractController
|
class AdminController extends AbstractController
|
||||||
{
|
{
|
||||||
|
@@ -17,7 +17,6 @@ use Chill\PersonBundle\Entity\Household\Household;
|
|||||||
use Chill\PersonBundle\Entity\Person;
|
use Chill\PersonBundle\Entity\Person;
|
||||||
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
|
|
||||||
class ChargeController extends AbstractElementController
|
class ChargeController extends AbstractElementController
|
||||||
{
|
{
|
||||||
@@ -71,9 +70,6 @@ class ChargeController extends AbstractElementController
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return \Symfony\Component\HttpFoundation\Response
|
|
||||||
*/
|
|
||||||
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/charge/{id}/view', name: 'chill_budget_charge_view')]
|
#[\Symfony\Component\Routing\Attribute\Route(path: '{_locale}/budget/charge/{id}/view', name: 'chill_budget_charge_view')]
|
||||||
public function viewAction(#[MapEntity(id: 'id')] Charge $charge): \Symfony\Component\HttpFoundation\Response
|
public function viewAction(#[MapEntity(id: 'id')] Charge $charge): \Symfony\Component\HttpFoundation\Response
|
||||||
{
|
{
|
||||||
|
@@ -19,7 +19,6 @@ use Chill\PersonBundle\Entity\Household\Household;
|
|||||||
use Chill\PersonBundle\Entity\Person;
|
use Chill\PersonBundle\Entity\Person;
|
||||||
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
|
|
||||||
class ElementController extends AbstractController
|
class ElementController extends AbstractController
|
||||||
{
|
{
|
||||||
|
@@ -18,7 +18,6 @@ use Chill\PersonBundle\Entity\Person;
|
|||||||
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
use Symfony\Bridge\Doctrine\Attribute\MapEntity;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
|
|
||||||
class ResourceController extends AbstractElementController
|
class ResourceController extends AbstractElementController
|
||||||
{
|
{
|
||||||
|
@@ -16,7 +16,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
|
|||||||
|
|
||||||
class Configuration implements ConfigurationInterface
|
class Configuration implements ConfigurationInterface
|
||||||
{
|
{
|
||||||
public function getConfigTreeBuilder(): \Symfony\Component\Config\Definition\Builder\TreeBuilder
|
public function getConfigTreeBuilder(): TreeBuilder
|
||||||
{
|
{
|
||||||
$treeBuilder = new TreeBuilder('chill_budget');
|
$treeBuilder = new TreeBuilder('chill_budget');
|
||||||
$rootNode = $treeBuilder->getRootNode();
|
$rootNode = $treeBuilder->getRootNode();
|
||||||
|
@@ -75,8 +75,6 @@ class Charge extends AbstractElement implements HasCentersInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id.
|
* Get id.
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
*/
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
{
|
{
|
||||||
|
@@ -47,8 +47,6 @@ class Resource extends AbstractElement implements HasCentersInterface
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id.
|
* Get id.
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
*/
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
{
|
{
|
||||||
|
@@ -20,7 +20,6 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
|
|||||||
use Chill\PersonBundle\Entity\Household\Household;
|
use Chill\PersonBundle\Entity\Household\Household;
|
||||||
use Chill\PersonBundle\Entity\Household\HouseholdMember;
|
use Chill\PersonBundle\Entity\Household\HouseholdMember;
|
||||||
use Chill\PersonBundle\Entity\Person;
|
use Chill\PersonBundle\Entity\Person;
|
||||||
use Doctrine\ORM\AbstractQuery;
|
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Doctrine\ORM\NativeQuery;
|
use Doctrine\ORM\NativeQuery;
|
||||||
use Doctrine\ORM\Query;
|
use Doctrine\ORM\Query;
|
||||||
|
@@ -30,43 +30,43 @@ final class Version20221207105407 extends AbstractMigration
|
|||||||
|
|
||||||
public function up(Schema $schema): void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
/* $resources = $this->container->getParameter('chill_budget.resources');
|
/* $resources = $this->container->getParameter('chill_budget.resources');
|
||||||
$charges = $this->container->getParameter('chill_budget.charges');
|
$charges = $this->container->getParameter('chill_budget.charges');
|
||||||
|
|
||||||
foreach ($resources as $value) {
|
foreach ($resources as $value) {
|
||||||
$lang = $value['labels'][0]['lang'];
|
$lang = $value['labels'][0]['lang'];
|
||||||
$label = $value['labels'][0]['label'];
|
$label = $value['labels'][0]['label'];
|
||||||
$kind = $value['key'];
|
$kind = $value['key'];
|
||||||
$this->addSql(
|
$this->addSql(
|
||||||
'INSERT INTO chill_budget.resource_type (id, isActive, name, ordering, kind) VALUES (
|
'INSERT INTO chill_budget.resource_type (id, isActive, name, ordering, kind) VALUES (
|
||||||
nextval(\'chill_budget.resource_type_id_seq\'), true, jsonb_build_object(:lang::text, :label::text), 0, :kind::text)',
|
nextval(\'chill_budget.resource_type_id_seq\'), true, jsonb_build_object(:lang::text, :label::text), 0, :kind::text)',
|
||||||
['lang' => $lang, 'label' => $label, 'kind' => $kind],
|
['lang' => $lang, 'label' => $label, 'kind' => $kind],
|
||||||
['lang' => Types::STRING, 'label' => Types::STRING, 'kind' => Types::STRING]
|
['lang' => Types::STRING, 'label' => Types::STRING, 'kind' => Types::STRING]
|
||||||
);
|
);
|
||||||
$this->addSql(
|
$this->addSql(
|
||||||
'UPDATE chill_budget.resource SET resource_id = resource_type.id
|
'UPDATE chill_budget.resource SET resource_id = resource_type.id
|
||||||
FROM chill_budget.resource_type WHERE resource.type = :kind AND resource_type.kind = resource.type;',
|
FROM chill_budget.resource_type WHERE resource.type = :kind AND resource_type.kind = resource.type;',
|
||||||
['kind' => $kind],
|
['kind' => $kind],
|
||||||
['kind' => Types::STRING]
|
['kind' => Types::STRING]
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($charges as $value) {
|
foreach ($charges as $value) {
|
||||||
$lang = $value['labels'][0]['lang'];
|
$lang = $value['labels'][0]['lang'];
|
||||||
$label = $value['labels'][0]['label'];
|
$label = $value['labels'][0]['label'];
|
||||||
$kind = $value['key'];
|
$kind = $value['key'];
|
||||||
$this->addSql(
|
$this->addSql(
|
||||||
'INSERT INTO chill_budget.charge_type VALUES (nextval(\'chill_budget.charge_type_id_seq\'), true,
|
'INSERT INTO chill_budget.charge_type VALUES (nextval(\'chill_budget.charge_type_id_seq\'), true,
|
||||||
jsonb_build_object(:lang::text, :label::text), 0, :kind::text);',
|
jsonb_build_object(:lang::text, :label::text), 0, :kind::text);',
|
||||||
['lang' => $lang, 'label' => $label, 'kind' => $kind],
|
['lang' => $lang, 'label' => $label, 'kind' => $kind],
|
||||||
['lang' => Types::STRING, 'label' => Types::STRING, 'kind' => Types::STRING]
|
['lang' => Types::STRING, 'label' => Types::STRING, 'kind' => Types::STRING]
|
||||||
);
|
);
|
||||||
$this->addSql(
|
$this->addSql(
|
||||||
'UPDATE chill_budget.charge SET charge_id = charge_type.id
|
'UPDATE chill_budget.charge SET charge_id = charge_type.id
|
||||||
FROM chill_budget.charge_type WHERE charge.type = :kind AND charge_type.kind = charge.type;',
|
FROM chill_budget.charge_type WHERE charge.type = :kind AND charge_type.kind = charge.type;',
|
||||||
['kind' => $kind],
|
['kind' => $kind],
|
||||||
['kind' => Types::STRING]
|
['kind' => Types::STRING]
|
||||||
);
|
);
|
||||||
}*/
|
}*/
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -12,7 +12,6 @@ declare(strict_types=1);
|
|||||||
namespace Chill\CalendarBundle\Controller;
|
namespace Chill\CalendarBundle\Controller;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
|
|
||||||
class AdminController extends AbstractController
|
class AdminController extends AbstractController
|
||||||
{
|
{
|
||||||
|
@@ -19,7 +19,6 @@ use Symfony\Component\HttpFoundation\JsonResponse;
|
|||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
|
|
||||||
class CalendarAPIController extends ApiController
|
class CalendarAPIController extends ApiController
|
||||||
{
|
{
|
||||||
|
@@ -40,7 +40,6 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
|
|||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
|
use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
use Symfony\Component\Serializer\SerializerInterface;
|
use Symfony\Component\Serializer\SerializerInterface;
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
|
@@ -23,7 +23,6 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
|
|||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||||
use Symfony\Bundle\SecurityBundle\Security;
|
use Symfony\Bundle\SecurityBundle\Security;
|
||||||
|
|
||||||
|
@@ -19,7 +19,6 @@ use Symfony\Component\HttpFoundation\JsonResponse;
|
|||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
|
|
||||||
class CalendarRangeAPIController extends ApiController
|
class CalendarRangeAPIController extends ApiController
|
||||||
{
|
{
|
||||||
|
@@ -29,7 +29,6 @@ use Symfony\Component\HttpFoundation\Response;
|
|||||||
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
|
||||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||||
use Symfony\Component\Messenger\MessageBusInterface;
|
use Symfony\Component\Messenger\MessageBusInterface;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
use Symfony\Bundle\SecurityBundle\Security;
|
use Symfony\Bundle\SecurityBundle\Security;
|
||||||
|
|
||||||
class InviteApiController
|
class InviteApiController
|
||||||
|
@@ -24,7 +24,6 @@ use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
|
|||||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
use TheNetworg\OAuth2\Client\Provider\Azure;
|
use TheNetworg\OAuth2\Client\Provider\Azure;
|
||||||
use TheNetworg\OAuth2\Client\Token\AccessToken;
|
use TheNetworg\OAuth2\Client\Token\AccessToken;
|
||||||
|
|
||||||
|
@@ -23,7 +23,6 @@ use Symfony\Component\HttpFoundation\Request;
|
|||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||||
use Symfony\Component\Messenger\MessageBusInterface;
|
use Symfony\Component\Messenger\MessageBusInterface;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
|
|
||||||
class RemoteCalendarMSGraphSyncController
|
class RemoteCalendarMSGraphSyncController
|
||||||
{
|
{
|
||||||
|
@@ -26,7 +26,6 @@ use Symfony\Component\HttpFoundation\JsonResponse;
|
|||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
use Symfony\Component\Serializer\SerializerInterface;
|
use Symfony\Component\Serializer\SerializerInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -21,7 +21,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
|
|||||||
*/
|
*/
|
||||||
class Configuration implements ConfigurationInterface
|
class Configuration implements ConfigurationInterface
|
||||||
{
|
{
|
||||||
public function getConfigTreeBuilder(): \Symfony\Component\Config\Definition\Builder\TreeBuilder
|
public function getConfigTreeBuilder(): TreeBuilder
|
||||||
{
|
{
|
||||||
$treeBuilder = new TreeBuilder('chill_calendar');
|
$treeBuilder = new TreeBuilder('chill_calendar');
|
||||||
$rootNode = $treeBuilder->getRootNode();
|
$rootNode = $treeBuilder->getRootNode();
|
||||||
|
@@ -30,7 +30,7 @@ use Doctrine\Common\Collections\Criteria;
|
|||||||
use Doctrine\Common\Collections\ReadableCollection;
|
use Doctrine\Common\Collections\ReadableCollection;
|
||||||
use Doctrine\Common\Collections\Selectable;
|
use Doctrine\Common\Collections\Selectable;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||||
use Symfony\Component\Validator\Constraints\Range;
|
use Symfony\Component\Validator\Constraints\Range;
|
||||||
|
@@ -18,7 +18,7 @@ use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
|
|||||||
use Chill\MainBundle\Entity\Location;
|
use Chill\MainBundle\Entity\Location;
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Annotation\Groups;
|
use Symfony\Component\Serializer\Attribute\Groups;
|
||||||
use Symfony\Component\Validator\Constraints as Assert;
|
use Symfony\Component\Validator\Constraints as Assert;
|
||||||
|
|
||||||
#[ORM\Entity]
|
#[ORM\Entity]
|
||||||
|
@@ -17,7 +17,7 @@ use Chill\MainBundle\Doctrine\Model\TrackUpdateInterface;
|
|||||||
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
|
use Chill\MainBundle\Doctrine\Model\TrackUpdateTrait;
|
||||||
use Chill\MainBundle\Entity\User;
|
use Chill\MainBundle\Entity\User;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An invitation for another user to a Calendar.
|
* An invitation for another user to a Calendar.
|
||||||
|
@@ -22,17 +22,17 @@ use Chill\CalendarBundle\Messenger\Message\CalendarRangeRemovedMessage;
|
|||||||
use Chill\CalendarBundle\RemoteCalendar\Connector\RemoteCalendarConnectorInterface;
|
use Chill\CalendarBundle\RemoteCalendar\Connector\RemoteCalendarConnectorInterface;
|
||||||
use Chill\MainBundle\Repository\UserRepository;
|
use Chill\MainBundle\Repository\UserRepository;
|
||||||
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
|
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
|
||||||
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a calendar range when it is removed from local calendar.
|
* Remove a calendar range when it is removed from local calendar.
|
||||||
*
|
*
|
||||||
* @AsMessageHandler
|
* @AsMessageHandler
|
||||||
*/
|
*/
|
||||||
#[\Symfony\Component\Messenger\Attribute\AsMessageHandler]
|
#[AsMessageHandler]
|
||||||
class CalendarRangeRemoveToRemoteHandler
|
class CalendarRangeRemoveToRemoteHandler
|
||||||
{
|
{
|
||||||
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly UserRepository $userRepository) {}
|
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly UserRepository $userRepository) {}
|
||||||
|
|
||||||
public function __invoke(CalendarRangeRemovedMessage $calendarRangeRemovedMessage): void
|
public function __invoke(CalendarRangeRemovedMessage $calendarRangeRemovedMessage): void
|
||||||
{
|
{
|
||||||
$this->remoteCalendarConnector->removeCalendarRange(
|
$this->remoteCalendarConnector->removeCalendarRange(
|
||||||
|
@@ -23,17 +23,17 @@ use Chill\CalendarBundle\RemoteCalendar\Connector\RemoteCalendarConnectorInterfa
|
|||||||
use Chill\CalendarBundle\Repository\CalendarRangeRepository;
|
use Chill\CalendarBundle\Repository\CalendarRangeRepository;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
|
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
|
||||||
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write calendar range creation / update to the remote calendar.
|
* Write calendar range creation / update to the remote calendar.
|
||||||
*
|
*
|
||||||
* @AsMessageHandler
|
* @AsMessageHandler
|
||||||
*/
|
*/
|
||||||
#[\Symfony\Component\Messenger\Attribute\AsMessageHandler]
|
#[AsMessageHandler]
|
||||||
class CalendarRangeToRemoteHandler
|
class CalendarRangeToRemoteHandler
|
||||||
{
|
{
|
||||||
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly EntityManagerInterface $entityManager) {}
|
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly EntityManagerInterface $entityManager) {}
|
||||||
|
|
||||||
public function __invoke(CalendarRangeMessage $calendarRangeMessage): void
|
public function __invoke(CalendarRangeMessage $calendarRangeMessage): void
|
||||||
{
|
{
|
||||||
$range = $this->calendarRangeRepository->find($calendarRangeMessage->getCalendarRangeId());
|
$range = $this->calendarRangeRepository->find($calendarRangeMessage->getCalendarRangeId());
|
||||||
|
@@ -22,7 +22,6 @@ use Chill\CalendarBundle\Messenger\Message\CalendarRemovedMessage;
|
|||||||
use Chill\CalendarBundle\RemoteCalendar\Connector\RemoteCalendarConnectorInterface;
|
use Chill\CalendarBundle\RemoteCalendar\Connector\RemoteCalendarConnectorInterface;
|
||||||
use Chill\CalendarBundle\Repository\CalendarRangeRepository;
|
use Chill\CalendarBundle\Repository\CalendarRangeRepository;
|
||||||
use Chill\MainBundle\Repository\UserRepositoryInterface;
|
use Chill\MainBundle\Repository\UserRepositoryInterface;
|
||||||
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle the deletion of calendar.
|
* Handle the deletion of calendar.
|
||||||
@@ -33,6 +32,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
|||||||
class CalendarRemoveHandler
|
class CalendarRemoveHandler
|
||||||
{
|
{
|
||||||
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly UserRepositoryInterface $userRepository) {}
|
public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly UserRepositoryInterface $userRepository) {}
|
||||||
|
|
||||||
public function __invoke(CalendarRemovedMessage $message): void
|
public function __invoke(CalendarRemovedMessage $message): void
|
||||||
{
|
{
|
||||||
if (null !== $message->getAssociatedCalendarRangeId()) {
|
if (null !== $message->getAssociatedCalendarRangeId()) {
|
||||||
|
@@ -28,17 +28,17 @@ use Chill\CalendarBundle\Repository\InviteRepository;
|
|||||||
use Chill\MainBundle\Repository\UserRepository;
|
use Chill\MainBundle\Repository\UserRepository;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
|
use Symfony\Component\Messenger\Attribute\AsMessageHandler;
|
||||||
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write calendar creation / update to the remote calendar.
|
* Write calendar creation / update to the remote calendar.
|
||||||
*
|
*
|
||||||
* @AsMessageHandler
|
* @AsMessageHandler
|
||||||
*/
|
*/
|
||||||
#[\Symfony\Component\Messenger\Attribute\AsMessageHandler]
|
#[AsMessageHandler]
|
||||||
class CalendarToRemoteHandler
|
class CalendarToRemoteHandler
|
||||||
{
|
{
|
||||||
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRepository $calendarRepository, private readonly EntityManagerInterface $entityManager, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $calendarConnector, private readonly UserRepository $userRepository) {}
|
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRepository $calendarRepository, private readonly EntityManagerInterface $entityManager, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $calendarConnector, private readonly UserRepository $userRepository) {}
|
||||||
|
|
||||||
public function __invoke(CalendarMessage $calendarMessage): void
|
public function __invoke(CalendarMessage $calendarMessage): void
|
||||||
{
|
{
|
||||||
$calendar = $this->calendarRepository->find($calendarMessage->getCalendarId());
|
$calendar = $this->calendarRepository->find($calendarMessage->getCalendarId());
|
||||||
|
@@ -22,7 +22,6 @@ use Chill\CalendarBundle\Messenger\Message\InviteUpdateMessage;
|
|||||||
use Chill\CalendarBundle\RemoteCalendar\Connector\RemoteCalendarConnectorInterface;
|
use Chill\CalendarBundle\RemoteCalendar\Connector\RemoteCalendarConnectorInterface;
|
||||||
use Chill\CalendarBundle\Repository\InviteRepository;
|
use Chill\CalendarBundle\Repository\InviteRepository;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sync the local invitation to the remote calendar.
|
* Sync the local invitation to the remote calendar.
|
||||||
@@ -33,6 +32,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
|||||||
class InviteUpdateHandler
|
class InviteUpdateHandler
|
||||||
{
|
{
|
||||||
public function __construct(private readonly EntityManagerInterface $em, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector) {}
|
public function __construct(private readonly EntityManagerInterface $em, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector) {}
|
||||||
|
|
||||||
public function __invoke(InviteUpdateMessage $inviteUpdateMessage): void
|
public function __invoke(InviteUpdateMessage $inviteUpdateMessage): void
|
||||||
{
|
{
|
||||||
if (null === $invite = $this->inviteRepository->find($inviteUpdateMessage->getInviteId())) {
|
if (null === $invite = $this->inviteRepository->find($inviteUpdateMessage->getInviteId())) {
|
||||||
|
@@ -27,7 +27,6 @@ use Chill\CalendarBundle\Repository\CalendarRepository;
|
|||||||
use Chill\MainBundle\Repository\UserRepository;
|
use Chill\MainBundle\Repository\UserRepository;
|
||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Psr\Log\LoggerInterface;
|
use Psr\Log\LoggerInterface;
|
||||||
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handle notification of changes made by users directly on Outlook calendar.
|
* Handle notification of changes made by users directly on Outlook calendar.
|
||||||
@@ -38,6 +37,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
|||||||
class MSGraphChangeNotificationHandler
|
class MSGraphChangeNotificationHandler
|
||||||
{
|
{
|
||||||
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRangeSyncer $calendarRangeSyncer, private readonly CalendarRepository $calendarRepository, private readonly CalendarSyncer $calendarSyncer, private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UserRepository $userRepository) {}
|
public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRangeSyncer $calendarRangeSyncer, private readonly CalendarRepository $calendarRepository, private readonly CalendarSyncer $calendarSyncer, private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UserRepository $userRepository) {}
|
||||||
|
|
||||||
public function __invoke(MSGraphChangeNotificationMessage $changeNotificationMessage): void
|
public function __invoke(MSGraphChangeNotificationMessage $changeNotificationMessage): void
|
||||||
{
|
{
|
||||||
$user = $this->userRepository->find($changeNotificationMessage->getUserId());
|
$user = $this->userRepository->find($changeNotificationMessage->getUserId());
|
||||||
|
@@ -18,7 +18,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Chill\CalendarBundle\RemoteCalendar\Model;
|
namespace Chill\CalendarBundle\RemoteCalendar\Model;
|
||||||
|
|
||||||
use Symfony\Component\Serializer\Annotation as Serializer;
|
use Symfony\Component\Serializer\Attribute as Serializer;
|
||||||
|
|
||||||
class RemoteEvent
|
class RemoteEvent
|
||||||
{
|
{
|
||||||
|
@@ -16,7 +16,6 @@ use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
|||||||
use Doctrine\ORM\EntityManagerInterface;
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
|
use Symfony\Bundle\FrameworkBundle\KernelBrowser;
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
|
@@ -19,7 +19,6 @@ declare(strict_types=1);
|
|||||||
namespace Chill\CalendarBundle\Tests\Controller;
|
namespace Chill\CalendarBundle\Tests\Controller;
|
||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
|
||||||
use Symfony\Component\Messenger\Transport\InMemoryTransport;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
|
@@ -39,7 +39,7 @@ final class AgentAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.agent_aggregator');
|
$this->aggregator = self::getContainer()->get('chill.calendar.export.agent_aggregator');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\AgentAggregator
|
public function getAggregator(): AgentAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,7 @@ final class CancelReasonAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.cancel_reason_aggregator');
|
$this->aggregator = self::getContainer()->get('chill.calendar.export.cancel_reason_aggregator');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\CancelReasonAggregator
|
public function getAggregator(): CancelReasonAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,7 @@ final class JobAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.job_aggregator');
|
$this->aggregator = self::getContainer()->get('chill.calendar.export.job_aggregator');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\JobAggregator
|
public function getAggregator(): JobAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,7 @@ final class LocationAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.location_aggregator');
|
$this->aggregator = self::getContainer()->get('chill.calendar.export.location_aggregator');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\LocationAggregator
|
public function getAggregator(): LocationAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,7 @@ final class LocationTypeAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.location_type_aggregator');
|
$this->aggregator = self::getContainer()->get('chill.calendar.export.location_type_aggregator');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\LocationTypeAggregator
|
public function getAggregator(): LocationTypeAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,7 @@ final class MonthYearAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.month_aggregator');
|
$this->aggregator = self::getContainer()->get('chill.calendar.export.month_aggregator');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\MonthYearAggregator
|
public function getAggregator(): MonthYearAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -39,7 +39,7 @@ final class ScopeAggregatorTest extends AbstractAggregatorTest
|
|||||||
$this->aggregator = self::getContainer()->get('chill.calendar.export.scope_aggregator');
|
$this->aggregator = self::getContainer()->get('chill.calendar.export.scope_aggregator');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAggregator(): \Chill\CalendarBundle\Export\Aggregator\ScopeAggregator
|
public function getAggregator(): ScopeAggregator
|
||||||
{
|
{
|
||||||
return $this->aggregator;
|
return $this->aggregator;
|
||||||
}
|
}
|
||||||
|
@@ -46,7 +46,7 @@ final class AgentFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get('chill.calendar.export.agent_filter');
|
$this->filter = self::getContainer()->get('chill.calendar.export.agent_filter');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\CalendarBundle\Export\Filter\AgentFilter
|
public function getFilter(): AgentFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -46,7 +46,7 @@ final class BetweenDatesFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get('chill.calendar.export.between_dates_filter');
|
$this->filter = self::getContainer()->get('chill.calendar.export.between_dates_filter');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\CalendarBundle\Export\Filter\BetweenDatesFilter
|
public function getFilter(): BetweenDatesFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -47,7 +47,7 @@ final class JobFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get('chill.calendar.export.job_filter');
|
$this->filter = self::getContainer()->get('chill.calendar.export.job_filter');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\CalendarBundle\Export\Filter\JobFilter
|
public function getFilter(): JobFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -47,7 +47,7 @@ final class ScopeFilterTest extends AbstractFilterTest
|
|||||||
$this->filter = self::getContainer()->get('chill.calendar.export.scope_filter');
|
$this->filter = self::getContainer()->get('chill.calendar.export.scope_filter');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFilter(): \Chill\CalendarBundle\Export\Filter\ScopeFilter
|
public function getFilter(): ScopeFilter
|
||||||
{
|
{
|
||||||
return $this->filter;
|
return $this->filter;
|
||||||
}
|
}
|
||||||
|
@@ -13,7 +13,6 @@ namespace Chill\CustomFieldsBundle\Controller;
|
|||||||
|
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class AdminController
|
* Class AdminController
|
||||||
|
@@ -18,7 +18,6 @@ use Doctrine\Persistence\ManagerRegistry;
|
|||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -25,7 +25,6 @@ use Symfony\Component\Form\Extension\Core\Type\FormType;
|
|||||||
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
|
||||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -64,7 +64,7 @@ class CustomFieldDate extends AbstractCustomField
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildOptionsForm(FormBuilderInterface $builder): \Symfony\Component\Form\FormBuilderInterface
|
public function buildOptionsForm(FormBuilderInterface $builder): FormBuilderInterface
|
||||||
{
|
{
|
||||||
$validatorFunction = static function ($value, ExecutionContextInterface $context) {
|
$validatorFunction = static function ($value, ExecutionContextInterface $context) {
|
||||||
try {
|
try {
|
||||||
|
@@ -63,7 +63,7 @@ class CustomFieldLongChoice extends AbstractCustomField
|
|||||||
->addModelTransformer(new CustomFieldDataTransformer($this, $customField));
|
->addModelTransformer(new CustomFieldDataTransformer($this, $customField));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildOptionsForm(FormBuilderInterface $builder): \Symfony\Component\Form\FormBuilderInterface
|
public function buildOptionsForm(FormBuilderInterface $builder): FormBuilderInterface
|
||||||
{
|
{
|
||||||
// create a selector between different keys
|
// create a selector between different keys
|
||||||
$keys = $this->optionRepository->getKeys();
|
$keys = $this->optionRepository->getKeys();
|
||||||
|
@@ -58,7 +58,7 @@ class CustomFieldNumber extends AbstractCustomField
|
|||||||
$builder->add($customField->getSlug(), $type, $fieldOptions);
|
$builder->add($customField->getSlug(), $type, $fieldOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildOptionsForm(FormBuilderInterface $builder): \Symfony\Component\Form\FormBuilderInterface
|
public function buildOptionsForm(FormBuilderInterface $builder): FormBuilderInterface
|
||||||
{
|
{
|
||||||
return $builder
|
return $builder
|
||||||
->add(self::MIN, NumberType::class, [
|
->add(self::MIN, NumberType::class, [
|
||||||
|
@@ -60,7 +60,7 @@ class CustomFieldText extends AbstractCustomField
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildOptionsForm(FormBuilderInterface $builder): \Symfony\Component\Form\FormBuilderInterface
|
public function buildOptionsForm(FormBuilderInterface $builder): FormBuilderInterface
|
||||||
{
|
{
|
||||||
return $builder
|
return $builder
|
||||||
->add(self::MAX_LENGTH, IntegerType::class, ['empty_data' => 256])
|
->add(self::MAX_LENGTH, IntegerType::class, ['empty_data' => 256])
|
||||||
|
@@ -46,7 +46,7 @@ class CustomFieldTitle extends AbstractCustomField
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function buildOptionsForm(FormBuilderInterface $builder): \Symfony\Component\Form\FormBuilderInterface
|
public function buildOptionsForm(FormBuilderInterface $builder): FormBuilderInterface
|
||||||
{
|
{
|
||||||
return $builder->add(
|
return $builder->add(
|
||||||
self::TYPE,
|
self::TYPE,
|
||||||
|
@@ -22,7 +22,7 @@ use Symfony\Component\Config\Definition\ConfigurationInterface;
|
|||||||
*/
|
*/
|
||||||
class Configuration implements ConfigurationInterface
|
class Configuration implements ConfigurationInterface
|
||||||
{
|
{
|
||||||
public function getConfigTreeBuilder(): \Symfony\Component\Config\Definition\Builder\TreeBuilder
|
public function getConfigTreeBuilder(): TreeBuilder
|
||||||
{
|
{
|
||||||
$treeBuilder = new TreeBuilder('chill_custom_fields');
|
$treeBuilder = new TreeBuilder('chill_custom_fields');
|
||||||
$rootNode = $treeBuilder->getRootNode();
|
$rootNode = $treeBuilder->getRootNode();
|
||||||
|
@@ -59,18 +59,14 @@ class CustomField
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get customFieldGroup.
|
* Get customFieldGroup.
|
||||||
*
|
|
||||||
* @return CustomFieldsGroup
|
|
||||||
*/
|
*/
|
||||||
public function getCustomFieldsGroup(): ?\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup
|
public function getCustomFieldsGroup(): ?CustomFieldsGroup
|
||||||
{
|
{
|
||||||
return $this->customFieldGroup;
|
return $this->customFieldGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id.
|
* Get id.
|
||||||
*
|
|
||||||
* @return int
|
|
||||||
*/
|
*/
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
{
|
{
|
||||||
@@ -103,9 +99,6 @@ class CustomField
|
|||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getOptions(): array
|
public function getOptions(): array
|
||||||
{
|
{
|
||||||
return $this->options;
|
return $this->options;
|
||||||
@@ -113,8 +106,6 @@ class CustomField
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get order.
|
* Get order.
|
||||||
*
|
|
||||||
* @return float
|
|
||||||
*/
|
*/
|
||||||
public function getOrdering(): ?float
|
public function getOrdering(): ?float
|
||||||
{
|
{
|
||||||
@@ -123,17 +114,12 @@ class CustomField
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* alias for isRequired.
|
* alias for isRequired.
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
*/
|
||||||
public function getRequired(): bool
|
public function getRequired(): bool
|
||||||
{
|
{
|
||||||
return $this->isRequired();
|
return $this->isRequired();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getSlug(): ?string
|
public function getSlug(): ?string
|
||||||
{
|
{
|
||||||
return $this->slug;
|
return $this->slug;
|
||||||
@@ -141,8 +127,6 @@ class CustomField
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get type.
|
* Get type.
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
*/
|
||||||
public function getType(): ?string
|
public function getType(): ?string
|
||||||
{
|
{
|
||||||
@@ -151,8 +135,6 @@ class CustomField
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if the custom field is active.
|
* Returns true if the custom field is active.
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
*/
|
||||||
public function isActive(): bool
|
public function isActive(): bool
|
||||||
{
|
{
|
||||||
@@ -161,8 +143,6 @@ class CustomField
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* return true if the field required.
|
* return true if the field required.
|
||||||
*
|
|
||||||
* @return bool
|
|
||||||
*/
|
*/
|
||||||
public function isRequired(): bool
|
public function isRequired(): bool
|
||||||
{
|
{
|
||||||
|
@@ -54,57 +54,36 @@ class Option
|
|||||||
$this->children = new ArrayCollection();
|
$this->children = new ArrayCollection();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function getActive(): bool
|
public function getActive(): bool
|
||||||
{
|
{
|
||||||
return $this->isActive();
|
return $this->isActive();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function getChildren(): Collection
|
||||||
* @return Collection
|
|
||||||
*/
|
|
||||||
public function getChildren(): \Doctrine\Common\Collections\Collection
|
|
||||||
{
|
{
|
||||||
return $this->children;
|
return $this->children;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return int
|
|
||||||
*/
|
|
||||||
public function getId(): ?int
|
public function getId(): ?int
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getInternalKey(): string
|
public function getInternalKey(): string
|
||||||
{
|
{
|
||||||
return $this->internalKey;
|
return $this->internalKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return string
|
|
||||||
*/
|
|
||||||
public function getKey(): ?string
|
public function getKey(): ?string
|
||||||
{
|
{
|
||||||
return $this->key;
|
return $this->key;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function getParent(): ?Option
|
||||||
* @return Option
|
|
||||||
*/
|
|
||||||
public function getParent(): ?\Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option
|
|
||||||
{
|
{
|
||||||
return $this->parent;
|
return $this->parent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function getText(): ?array
|
public function getText(): ?array
|
||||||
{
|
{
|
||||||
return $this->text;
|
return $this->text;
|
||||||
@@ -118,9 +97,6 @@ class Option
|
|||||||
return null === $this->parent ? false : true;
|
return null === $this->parent ? false : true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return bool
|
|
||||||
*/
|
|
||||||
public function isActive(): bool
|
public function isActive(): bool
|
||||||
{
|
{
|
||||||
return $this->active;
|
return $this->active;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user