|
|
@@ -18,24 +18,14 @@ use App\State\Provider\HelloAsso\OrganizationFormProvider;
|
|
|
#[ApiResource(
|
|
|
operations: [
|
|
|
new Get(
|
|
|
- uriTemplate: '/helloasso/form/{id}',
|
|
|
- ),
|
|
|
- new GetCollection(
|
|
|
- uriTemplate: '/helloasso/forms',
|
|
|
- ),
|
|
|
+ uriTemplate: '/helloasso/form/{eventId}',
|
|
|
+ )
|
|
|
],
|
|
|
provider: OrganizationFormProvider::class,
|
|
|
security: 'is_granted("ROLE_ORGANIZATION")'
|
|
|
)]
|
|
|
class OrganizationForm
|
|
|
{
|
|
|
- /**
|
|
|
- * Id 'bidon' ajouté par défaut pour permettre la construction
|
|
|
- * de l'IRI par api platform.
|
|
|
- */
|
|
|
- #[ApiProperty(identifier: true)]
|
|
|
- private int $id = 1;
|
|
|
-
|
|
|
/**
|
|
|
* Slug du formulaire
|
|
|
*/
|
|
|
@@ -50,18 +40,7 @@ class OrganizationForm
|
|
|
/**
|
|
|
* Url du formulaire
|
|
|
*/
|
|
|
- private string $url;
|
|
|
-
|
|
|
- public function getId(): int
|
|
|
- {
|
|
|
- return $this->id;
|
|
|
- }
|
|
|
-
|
|
|
- public function setId(int $id): self
|
|
|
- {
|
|
|
- $this->id = $id;
|
|
|
- return $this;
|
|
|
- }
|
|
|
+ private string $widgetUrl;
|
|
|
|
|
|
public function getSlug(): string
|
|
|
{
|
|
|
@@ -85,14 +64,14 @@ class OrganizationForm
|
|
|
return $this;
|
|
|
}
|
|
|
|
|
|
- public function getUrl(): string
|
|
|
+ public function getWidgetUrl(): string
|
|
|
{
|
|
|
- return $this->url;
|
|
|
+ return $this->widgetUrl;
|
|
|
}
|
|
|
|
|
|
- public function setUrl(string $url): self
|
|
|
+ public function setWidgetUrl(string $widgetUrl): self
|
|
|
{
|
|
|
- $this->url = $url;
|
|
|
+ $this->widgetUrl = $widgetUrl;
|
|
|
return $this;
|
|
|
}
|
|
|
}
|