[wip] CRUD

This commit is contained in:
2019-12-03 15:04:39 +01:00
parent 1860a6bae4
commit 257d101fbe
5 changed files with 136 additions and 31 deletions

View File

@@ -127,9 +127,32 @@ class Configuration implements ConfigurationInterface
->scalarNode('base_role')->defaultNull()->end()
->scalarNode('form_class')->defaultNull()->end()
->arrayNode('actions')
->scalarPrototype()->end()
->defaultValue(['index', 'new', 'edit', 'show', 'delete'])
->defaultValue([
'edit' => [],
'new' => []
])
->useAttributeAsKey('name')
->arrayPrototype()
->children()
->scalarNode('controller')
->defaultValue('')
->info('the method name to call in the route. Will be set to the action name if left empty.')
->example("'MyBundle\Controller\MyCrudController::action'")
->end()
->scalarNode('path')
->defaultValue('')
->info('the path that will be **appended** after the base path. Do not forget to add '
. 'arguments for the method. Will be set to the action name, including an `{id}` '
. 'parameter if left empty.')
->example('/{id}/my-action')
->end()
->arrayNode('requirements')
->ignoreExtraKeys(false)
->info('the requirements for the route. Will be set to `[ \'id\' => \'\d+\' ]` if left empty.')
->end()
->end()
->end()
->end()
->end()
->end()