File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1515
1616use ApiPlatform \Doctrine \Orm \Filter \OrderFilter ;
1717use ApiPlatform \Metadata \ApiFilter ;
18+ use ApiPlatform \Metadata \ApiProperty ;
1819use ApiPlatform \Metadata \ApiResource ;
1920use Doctrine \Common \Collections \ArrayCollection ;
2021use Doctrine \Common \Collections \Collection ;
@@ -47,7 +48,8 @@ class Layout
4748 /**
4849 * @var Collection<int, Page>
4950 */
50- private Collection $ pages ;
51+ #[ApiProperty(writable: false )]
52+ public Collection $ pages ;
5153
5254 public function __construct ()
5355 {
@@ -61,9 +63,4 @@ public static function loadValidatorMetadata(ClassMetadata $metadata): void
6163 'message ' => 'You must define the uiComponent for this resource. ' ,
6264 ]));
6365 }
64-
65- public function getPages (): Collection
66- {
67- return $ this ->pages ;
68- }
6966}
You can’t perform that action at this time.
0 commit comments