|
|
@@ -4,20 +4,19 @@ declare(strict_types=1);
|
|
|
|
|
|
namespace App\Entity\Public;
|
|
|
|
|
|
-use ApiPlatform\Metadata\Get;
|
|
|
-use Doctrine\ORM\Mapping as ORM;
|
|
|
-use ApiPlatform\Metadata\ApiFilter;
|
|
|
-use ApiPlatform\Metadata\ApiResource;
|
|
|
-use ApiPlatform\Metadata\GetCollection;
|
|
|
use ApiPlatform\Doctrine\Orm\Filter\DateFilter;
|
|
|
+use ApiPlatform\Doctrine\Orm\Filter\NumericFilter;
|
|
|
use ApiPlatform\Doctrine\Orm\Filter\OrderFilter;
|
|
|
use ApiPlatform\Doctrine\Orm\Filter\RangeFilter;
|
|
|
-use App\Filter\ApiPlatform\Utils\DistanceFilter;
|
|
|
-use App\Repository\Public\PublicEventRepository;
|
|
|
use ApiPlatform\Doctrine\Orm\Filter\SearchFilter;
|
|
|
-use ApiPlatform\Doctrine\Orm\Filter\NumericFilter;
|
|
|
+use ApiPlatform\Metadata\ApiFilter;
|
|
|
+use ApiPlatform\Metadata\ApiResource;
|
|
|
+use ApiPlatform\Metadata\Get;
|
|
|
+use ApiPlatform\Metadata\GetCollection;
|
|
|
use App\Filter\ApiPlatform\Utils\ArrayFieldFilter;
|
|
|
-use App\Filter\ApiPlatform\PublicEvent\ExcludeGenderFilter;
|
|
|
+use App\Filter\ApiPlatform\Utils\DistanceFilter;
|
|
|
+use App\Repository\Public\PublicEventRepository;
|
|
|
+use Doctrine\ORM\Mapping as ORM;
|
|
|
|
|
|
/**
|
|
|
* Évènements publics tels que publiés sur l'agenda du site opentalent ou les sites des structures.
|
|
|
@@ -44,7 +43,6 @@ use App\Filter\ApiPlatform\PublicEvent\ExcludeGenderFilter;
|
|
|
#[ApiFilter(filterClass: OrderFilter::class, properties: ['datetimeStart', 'datetimeEnd'], arguments: ['orderParameterName' => 'order'])]
|
|
|
#[ApiFilter(filterClass: RangeFilter::class, properties: ['priceMini', 'priceMaxi'])]
|
|
|
#[ApiFilter(filterClass: ArrayFieldFilter::class, properties: ['categories', 'gender'])]
|
|
|
-#[ApiFilter(ExcludeGenderFilter::class)]
|
|
|
class PublicEvent
|
|
|
{
|
|
|
#[ORM\Id]
|
|
|
@@ -129,8 +127,6 @@ class PublicEvent
|
|
|
#[ORM\Column]
|
|
|
private ?string $categoryCode;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
public function getUuid(): string
|
|
|
{
|
|
|
return $this->uuid;
|
|
|
@@ -377,14 +373,23 @@ class PublicEvent
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @return string[]|null returns a list of gender identifiers as strings
|
|
|
+ */
|
|
|
public function getGender(): ?array
|
|
|
{
|
|
|
return $this->gender;
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @param string[]|null $gender gender identifiers as a list of strings
|
|
|
+ *
|
|
|
+ * @return $this
|
|
|
+ */
|
|
|
public function setGender(?array $gender): PublicEvent
|
|
|
{
|
|
|
$this->gender = $gender;
|
|
|
+
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
@@ -447,6 +452,4 @@ class PublicEvent
|
|
|
|
|
|
return $this;
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
}
|