We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abb7a73 commit b4e0a60Copy full SHA for b4e0a60
src/Entity/Core/Layout.php
@@ -15,6 +15,7 @@
15
16
use ApiPlatform\Doctrine\Orm\Filter\OrderFilter;
17
use ApiPlatform\Metadata\ApiFilter;
18
+use ApiPlatform\Metadata\ApiProperty;
19
use ApiPlatform\Metadata\ApiResource;
20
use Doctrine\Common\Collections\ArrayCollection;
21
use Doctrine\Common\Collections\Collection;
@@ -47,7 +48,8 @@ class Layout
47
48
/**
49
* @var Collection<int, Page>
50
*/
- private Collection $pages;
51
+ #[ApiProperty(writable: false)]
52
+ public Collection $pages;
53
54
public function __construct()
55
{
@@ -61,9 +63,4 @@ public static function loadValidatorMetadata(ClassMetadata $metadata): void
61
63
'message' => 'You must define the uiComponent for this resource.',
62
64
]));
65
}
-
- public function getPages(): Collection
66
- {
67
- return $this->pages;
68
- }
69
0 commit comments