-
Notifications
You must be signed in to change notification settings - Fork 351
Move sulu core structure config to sulu admin config #7908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move sulu core structure config to sulu admin config #7908
Conversation
Personally I would go with variant |
Think the migration is also for variant B kind of fine in both cases they need modify a few keys and at the end the container is only valid if they give a valid parts in it. Migration for Variant B would look like this: -sulu_core:
+sulu_admin:
- content:
+ templates:
- structure:
+ pages:
paths:
- page_projectA:
- path: '%kernel.project_dir%/config/templates/pages/projectA'
- type: page
+ page_projectA: '%kernel.project_dir%/config/templates/pages/projectA'
- page_projectB:
- path: '%kernel.project_dir%/config/templates/pages/projectB'
- type: page
+ page_projectB: '%kernel.project_dir%/config/templates/pages/projectB' |
206c683
to
13ee98e
Compare
13ee98e
to
b33b3e3
Compare
->defaultValue(null) | ||
->example('default') | ||
->end() | ||
->arrayNode('directories') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Prokyonn did go with directories like we already did for forms
and lists
@@ -274,6 +274,14 @@ public function prependExtension(ContainerConfigurator $container, ContainerBuil | |||
// \dirname(__DIR__, 4) . '/config/forms', | |||
], | |||
], | |||
'templates' => [ | |||
'articles' => [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did go with the resource key now
@@ -144,16 +144,17 @@ public function load(array $configs, ContainerBuilder $container): void | |||
$configuration = $this->getConfiguration($configs, $container); | |||
$config = $this->processConfiguration($configuration, $configs); | |||
|
|||
$container->setParameter($this->getAlias() . '.name', $config['name']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed the getAlias()
and used hardcoded value to make the parameters easier to find with searches
|
||
$container->setParameter('sulu_admin.forms.directories', $config['forms']['directories'] ?? []); | ||
$container->setParameter('sulu_admin.lists.directories', $config['lists']['directories'] ?? []); | ||
$container->setParameter('sulu_admin.templates.configuration', $config['templates']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here is some inconsistency with the parameter names
$config['collaboration']['enabled']
translates to sulu_admin.collaboration_enabled
but
$config['forms']['directories']
translates to sulu_admin.forms.directories
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really strange not sure why this is. I know that when 2.0 was build it was defined that service name should always be <bundle>.<service>
and so no more as one dot should be inside them. Strange this wasn't done for the parameters here.
What's in this PR?
Move sulu core structure config to sulu admin config.
Why?
We should get rid of structure specific config and make all kind of metadata based on Sulu Admin service nothinger else.
Example Usage
Current: https://docs.sulu.io/en/2.6/cookbook/override-dir-structure.html#overwrite-templates-configuration-files-path
Not sure yet.
Open the PR to discuss this OptionA
:alternative
B
:/cc @Prokyonn
This introduces a new parameter
sulu_admin.templates.configuration
which we can later use in the new loader:ToDo