Skip to content
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

Allow to avoid registering Controller for both contexts #19

Merged
merged 1 commit into from
Oct 30, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,16 @@ services:
resource: '../src/Controller'
tags: ['controller.service_arguments']

# add controllers as services that are specific to a certain sulu context
# a sulu context is a different mode in the kernel allowing to have a different set of services
# because controllers might rely on services only existing in one of both contexts
App\Controller\Admin\:
alexander-schranz marked this conversation as resolved.
Show resolved Hide resolved
resource: '../src/Controller/Admin'
tags: ['controller.service_arguments', {name: 'sulu.context', context: 'admin'}]

App\Controller\Website\:
resource: '../src/Controller/Website'
tags: ['controller.service_arguments', {name: 'sulu.context', context: 'website'}]

# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
File renamed without changes.
Empty file.