first impl for index action

This commit is contained in:
2021-05-06 12:08:45 +02:00
parent 07e0692783
commit 2b8bbe019d
10 changed files with 375 additions and 60 deletions

View File

@@ -189,14 +189,16 @@ class Configuration implements ConfigurationInterface
->children()
->scalarNode('controller_action')
->defaultNull()
->info('the method name to call in the route. Will be set to the concatenation of action name + \'Api\' if left empty.')
->info('the method name to call in the controller. Will be set to the concatenation '.
'of action name + \'Api\' if left empty.')
->example("showApi")
->end()
->scalarNode('path')
->defaultNull()
->info('the path that will be **appended** after the base path. Do not forget to add '
. 'arguments for the method. By default, will set to the action name, including an `{id}` '
. 'parameter. A suffix of action name will be appended, except if the action name is "entity".')
->info('the path that will be **appended** after the base path. Do not forget to add ' .
'arguments for the method. By default, will set to the action name, including an `{id}` '.
'parameter. A suffix of action name will be appended, except if the action name '.
'is "_entity".')
->example('/{id}/my-action')
->end()
->arrayNode('requirements')
@@ -205,7 +207,10 @@ class Configuration implements ConfigurationInterface
->end()
->enumNode('single-collection')
->values(['single', 'collection'])
->info('indicates if the returned object is a single element or a collection')
->defaultValue('single')
->info('indicates if the returned object is a single element or a collection. '.
'If the action name is `_index`, this value will always be considered as '.
'`collection`')
->end()
->arrayNode('methods')
->addDefaultsIfNotSet()
@@ -219,6 +224,7 @@ class Configuration implements ConfigurationInterface
->end()
->end()
->arrayNode('roles')
->addDefaultsIfNotSet()
->info("The role require for each http method")
->children()
->scalarNode(Request::METHOD_GET)->defaultNull()->end()