| @@ 212-222 (lines=11) @@ | ||
| 209 | ||
| 210 | $property['property_options'] = $this->askForPropertyOptions($input, $output); |
|
| 211 | break; |
|
| 212 | case 'parentDocument': |
|
| 213 | if (!$this->isUniqueAnnotation($properties, $property['annotation'])) { |
|
| 214 | $output->writeln( |
|
| 215 | $this |
|
| 216 | ->getException('Only one "%s" field can be added', [$property['annotation']]) |
|
| 217 | ->getMessage() |
|
| 218 | ); |
|
| 219 | continue(2); |
|
| 220 | } |
|
| 221 | $property['property_class'] = $this->askForPropertyClass($input, $output); |
|
| 222 | break; |
|
| 223 | case 'property': |
|
| 224 | $property['property_name'] = $this->askForPropertyName($input, $output, $property['field_name']); |
|
| 225 | ||
| @@ 240-254 (lines=15) @@ | ||
| 237 | ||
| 238 | $property['property_options'] = $this->askForPropertyOptions($input, $output); |
|
| 239 | break; |
|
| 240 | case 'ttl': |
|
| 241 | if (!$this->isUniqueAnnotation($properties, $property['annotation'])) { |
|
| 242 | $output->writeln( |
|
| 243 | $this |
|
| 244 | ->getException('Only one "%s" field can be added', [$property['annotation']]) |
|
| 245 | ->getMessage() |
|
| 246 | ); |
|
| 247 | continue(2); |
|
| 248 | } |
|
| 249 | $property['property_default'] = $this->questionHelper->ask( |
|
| 250 | $input, |
|
| 251 | $output, |
|
| 252 | $this->getQuestion("\n" . 'Default time to live') |
|
| 253 | ); |
|
| 254 | break; |
|
| 255 | case 'id': |
|
| 256 | if (!$this->isUniqueAnnotation($properties, $property['annotation'])) { |
|
| 257 | $output->writeln( |
|