@@ 125-136 (lines=12) @@ | ||
122 | * |
|
123 | * @return NormalizationFieldMappingBuilderInterface |
|
124 | */ |
|
125 | public static function createReferenceMany( |
|
126 | string $name, |
|
127 | string $idName = 'id' |
|
128 | ): NormalizationFieldMappingBuilderInterface { |
|
129 | $self = new self($name); |
|
130 | $self->fieldNormalizer = new ReferenceManyFieldNormalizer( |
|
131 | new PropertyAccessor($idName), |
|
132 | new PropertyAccessor($name) |
|
133 | ); |
|
134 | ||
135 | return $self; |
|
136 | } |
|
137 | ||
138 | /** |
|
139 | * @param string $name |
|
@@ 144-155 (lines=12) @@ | ||
141 | * |
|
142 | * @return NormalizationFieldMappingBuilderInterface |
|
143 | */ |
|
144 | public static function createReferenceOne( |
|
145 | string $name, |
|
146 | string $idName = 'id' |
|
147 | ): NormalizationFieldMappingBuilderInterface { |
|
148 | $self = new self($name); |
|
149 | $self->fieldNormalizer = new ReferenceOneFieldNormalizer( |
|
150 | new PropertyAccessor($idName), |
|
151 | new PropertyAccessor($name) |
|
152 | ); |
|
153 | ||
154 | return $self; |
|
155 | } |
|
156 | ||
157 | /** |
|
158 | * @deprecated |