|
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace App\ApiResources\Tree;
|
|
namespace App\ApiResources\Tree;
|
|
|
|
|
|
|
|
|
|
+use ApiPlatform\Metadata\ApiProperty;
|
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
use ApiPlatform\Metadata\ApiResource;
|
|
|
use ApiPlatform\Metadata\Get;
|
|
use ApiPlatform\Metadata\Get;
|
|
|
use App\Service\Utils\Tree\BaseResourceTree;
|
|
use App\Service\Utils\Tree\BaseResourceTree;
|
|
@@ -20,4 +21,21 @@ use App\State\Provider\Tree\TypeOfPracticeTreeProvider;
|
|
|
)]
|
|
)]
|
|
|
class TypeOfPracticeTree extends BaseResourceTree implements ResourceTreeInterface
|
|
class TypeOfPracticeTree extends BaseResourceTree implements ResourceTreeInterface
|
|
|
{
|
|
{
|
|
|
|
|
+ /**
|
|
|
|
|
+ * Id 'bidon' ajouté par défaut pour permettre la construction
|
|
|
|
|
+ * de l'IRI par api platform.
|
|
|
|
|
+ */
|
|
|
|
|
+ #[ApiProperty(identifier: true)]
|
|
|
|
|
+ private int $id = 1;
|
|
|
|
|
+
|
|
|
|
|
+ public function getId(): int
|
|
|
|
|
+ {
|
|
|
|
|
+ return $this->id;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ public function setId(int $id): self
|
|
|
|
|
+ {
|
|
|
|
|
+ $this->id = $id;
|
|
|
|
|
+ return $this;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|