first impl for create form

This commit is contained in:
2021-06-18 19:41:58 +02:00
parent 07cc394abd
commit 3abfdbf6fd
16 changed files with 448 additions and 8 deletions

View File

@@ -146,7 +146,7 @@ class CRUDRoutesLoader extends Loader
foreach ($crudConfig['actions'] as $name => $action) {
// filter only on single actions
$singleCollection = $action['single-collection'] ?? $name === '_entity' ? 'single' : NULL;
$singleCollection = $action['single_collection'] ?? $name === '_entity' ? 'single' : NULL;
if ('collection' === $singleCollection) {
// continue;
}
@@ -171,7 +171,7 @@ class CRUDRoutesLoader extends Loader
// path are rewritten
// if name === 'default', we rewrite it to nothing :-)
$localName = \in_array($name, [ '_entity', '_index' ]) ? '' : '/'.$name;
if ('collection' === $action['single-collection'] || '_index' === $name) {
if ('collection' === $action['single_collection'] || '_index' === $name) {
$localPath = $action['path'] ?? $localName.'.{_format}';
} else {
$localPath = $action['path'] ?? '/{id}'.$localName.'.{_format}';