File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ This is useful when you need two entities to have more than one relation.
83
83
Example :
84
84
85
85
` ` ` yaml
86
+ types:
86
87
Organization:
87
88
properties:
88
89
contactPoint: { range: Person, relationTableName: organization_contactPoint }
@@ -96,6 +97,7 @@ Override the guessed class hierarchy of a given type with this option.
96
97
Example :
97
98
98
99
` ` ` yaml
100
+ types:
99
101
ImageObject:
100
102
parent: Thing # Force the parent to be Thing instead of CreativeWork > MediaObject
101
103
properties: ~
@@ -110,10 +112,27 @@ Force a class to be (or to not be) `abstract`.
110
112
Example :
111
113
112
114
` ` ` yaml
115
+ types:
113
116
Person:
114
117
abstract: true
115
118
` ` `
116
119
120
+ # # Define Operations
121
+
122
+ API Platform operations can be added this way :
123
+
124
+ ` ` ` yaml
125
+ types:
126
+ Person:
127
+ operations:
128
+ item:
129
+ get:
130
+ method: GET
131
+ collection:
132
+ get:
133
+ route_name: get_person_collection
134
+ ` ` `
135
+
117
136
# # Forcing a Nullable Property
118
137
119
138
Force a property to be (or to not be) `nullable`.
@@ -128,7 +147,7 @@ Example:
128
147
name: { nullable: false }
129
148
` ` `
130
149
131
- The `@Assert\NotNull` constrain is automatically added.
150
+ The `@Assert\NotNull` constraint is automatically added.
132
151
133
152
` ` ` php
134
153
<?php
@@ -659,6 +678,9 @@ config:
659
678
# If declaring a custom class, this will be the class from which properties type will be guessed
660
679
guessFrom: Thing
661
680
681
+ # Operations for the class
682
+ operations: []
683
+
662
684
# Import all existing properties
663
685
allProperties: false
664
686
You can’t perform that action at this time.
0 commit comments