Skip to content

Commit

Permalink
Add data source in configuration and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet committed Nov 26, 2020
1 parent ddbc55b commit 809db9f
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
11 changes: 6 additions & 5 deletions docs/cookbook/recipe_overwrite_admin_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ with the following templates:
admin_services:
id.of.admin.service:
# service configuration
model_manager: sonata.admin.manager.doctrine_orm
form_contractor: sonata.admin.builder.doctrine_orm
show_builder: sonata.admin.builder.doctrine_orm
list_builder: sonata.admin.builder.doctrine_orm
datagrid_builder: sonata.admin.builder.doctrine_orm
model_manager: sonata.admin.manager.orm
data_source: sonata.admin.data_source.orm
form_contractor: sonata.admin.builder.orm_form
show_builder: sonata.admin.builder.orm_show
list_builder: sonata.admin.builder.orm_list
datagrid_builder: sonata.admin.builder.orm_datagrid
translator: translator
configuration_pool: sonata.admin.pool
route_generator: sonata.admin.route.default_generator
Expand Down
1 change: 1 addition & 0 deletions docs/reference/advanced_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ the services which are injected by default are:
Dependencies Service ID
========================= ===================================================================
model_manager sonata.admin.manager.%manager-type%
data_source sonata.admin.data_source.%manager-type%
form_contractor sonata.admin.builder.%manager-type%_form
show_builder sonata.admin.builder.%manager-type%_show
list_builder sonata.admin.builder.%manager-type%_list
Expand Down
3 changes: 2 additions & 1 deletion docs/reference/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ injected by the bundle:
Class Description
========================= =========================================================================
ConfigurationPool configuration pool where all Admin class instances are stored
ModelManager service which handles specific code relating to your persistence layer (e.g. Doctrine ORM)
ModelManager handles specific code relating to your persistence layer (e.g. Doctrine ORM)
DataSource handles code related to the sonata exporter
FormContractor builds the forms for the edit/create views using the Symfony ``FormBuilder``
ShowBuilder builds the show fields
ListBuilder builds the list fields
Expand Down
1 change: 1 addition & 0 deletions docs/reference/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ Full Configuration Options
class: col-md-4
admin_services:
model_manager: null
data_source: null
form_contractor: null
show_builder: null
list_builder: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ public function applyConfigurationFromAttribute(Definition $definition, array $a
{
$keys = [
'model_manager',
'data_source',
'form_contractor',
'show_builder',
'list_builder',
Expand Down
1 change: 1 addition & 0 deletions src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,7 @@ public function getConfigTreeBuilder()
->arrayNode('admin_services')
->prototype('array')
->children()
->scalarNode('data_source')->defaultNull()->end()
->scalarNode('model_manager')->defaultNull()->end()
->scalarNode('form_contractor')->defaultNull()->end()
->scalarNode('show_builder')->defaultNull()->end()
Expand Down

0 comments on commit 809db9f

Please sign in to comment.