forked from sonata-project/SonataAdminBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d54497d
commit 3ad3910
Showing
31 changed files
with
1,043 additions
and
493 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Sonata Project package. | ||
* | ||
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
use Sonata\AdminBundle\Action\AppendFormFieldElementAction; | ||
use Sonata\AdminBundle\Action\DashboardAction; | ||
use Sonata\AdminBundle\Action\GetShortObjectDescriptionAction; | ||
use Sonata\AdminBundle\Action\RetrieveAutocompleteItemsAction; | ||
use Sonata\AdminBundle\Action\RetrieveFormFieldElementAction; | ||
use Sonata\AdminBundle\Action\SearchAction; | ||
use Sonata\AdminBundle\Action\SetObjectFieldValueAction; | ||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
use Symfony\Component\DependencyInjection\Loader\Configurator\ReferenceConfigurator; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
// Use "service" function for creating references to services when dropping support for Symfony 4.4 | ||
// Use "param" function for creating references to parameters when dropping support for Symfony 5.1 | ||
$containerConfigurator->services() | ||
|
||
->set(DashboardAction::class, DashboardAction::class) | ||
->public() | ||
->args([ | ||
'%sonata.admin.configuration.dashboard_blocks%', | ||
new ReferenceConfigurator('sonata.admin.breadcrumbs_builder'), | ||
new ReferenceConfigurator('sonata.admin.global_template_registry'), | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
new ReferenceConfigurator('twig'), | ||
]) | ||
|
||
->set(SearchAction::class, SearchAction::class) | ||
->public() | ||
->args([ | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
new ReferenceConfigurator('sonata.admin.search.handler'), | ||
new ReferenceConfigurator('sonata.admin.global_template_registry'), | ||
new ReferenceConfigurator('sonata.admin.breadcrumbs_builder'), | ||
new ReferenceConfigurator('twig'), | ||
]) | ||
|
||
->set('sonata.admin.action.append_form_field_element', AppendFormFieldElementAction::class) | ||
->public() | ||
->args([ | ||
new ReferenceConfigurator('twig'), | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
new ReferenceConfigurator('sonata.admin.helper'), | ||
]) | ||
|
||
->set('sonata.admin.action.retrieve_form_field_element', RetrieveFormFieldElementAction::class) | ||
->public() | ||
->args([ | ||
new ReferenceConfigurator('twig'), | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
new ReferenceConfigurator('sonata.admin.helper'), | ||
]) | ||
|
||
->set('sonata.admin.action.get_short_object_description', GetShortObjectDescriptionAction::class) | ||
->public() | ||
->args([ | ||
new ReferenceConfigurator('twig'), | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
]) | ||
|
||
->set('sonata.admin.action.set_object_field_value', SetObjectFieldValueAction::class) | ||
->public() | ||
->args([ | ||
new ReferenceConfigurator('twig'), | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
new ReferenceConfigurator('validator'), | ||
]) | ||
|
||
->set('sonata.admin.action.retrieve_autocomplete_items', RetrieveAutocompleteItemsAction::class) | ||
->public() | ||
->args([ | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
]) | ||
; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Sonata Project package. | ||
* | ||
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
use Sonata\AdminBundle\Block\AdminListBlockService; | ||
use Sonata\AdminBundle\Block\AdminSearchBlockService; | ||
use Sonata\AdminBundle\Block\AdminStatsBlockService; | ||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
use Symfony\Component\DependencyInjection\Loader\Configurator\ReferenceConfigurator; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
// Use "service" function for creating references to services when dropping support for Symfony 4.4 | ||
// Use "param" function for creating references to parameters when dropping support for Symfony 5.1 | ||
$containerConfigurator->services() | ||
|
||
->set('sonata.admin.block.admin_list', AdminListBlockService::class) | ||
->public() | ||
->tag('sonata.block') | ||
->args([ | ||
new ReferenceConfigurator('twig'), | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
new ReferenceConfigurator('sonata.admin.global_template_registry'), | ||
]) | ||
|
||
->set('sonata.admin.block.search_result', AdminSearchBlockService::class) | ||
->public() | ||
->tag('sonata.block') | ||
->args([ | ||
new ReferenceConfigurator('twig'), | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
new ReferenceConfigurator('sonata.admin.search.handler'), | ||
]) | ||
|
||
->set('sonata.admin.block.stats', AdminStatsBlockService::class) | ||
->public() | ||
->tag('sonata.block') | ||
->args([ | ||
new ReferenceConfigurator('twig'), | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
]) | ||
; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Sonata Project package. | ||
* | ||
* (c) Thomas Rabaix <thomas.rabaix@sonata-project.org> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
use Sonata\AdminBundle\Command\CreateClassCacheCommand; | ||
use Sonata\AdminBundle\Command\ExplainAdminCommand; | ||
use Sonata\AdminBundle\Command\GenerateObjectAclCommand; | ||
use Sonata\AdminBundle\Command\ListAdminCommand; | ||
use Sonata\AdminBundle\Command\SetupAclCommand; | ||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator; | ||
use Symfony\Component\DependencyInjection\Loader\Configurator\ReferenceConfigurator; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
// Use "service" function for creating references to services when dropping support for Symfony 4.4 | ||
// Use "param" function for creating references to parameters when dropping support for Symfony 5.1 | ||
$containerConfigurator->services() | ||
|
||
// NEXT_MAJOR: Remove this service. | ||
->set(CreateClassCacheCommand::class, CreateClassCacheCommand::class) | ||
->public() | ||
->tag('console.command', [ | ||
'command' => 'cache:create-cache-class', | ||
]) | ||
->deprecate('The "%service_id%" service is deprecated since sonata-project/admin-bundle 3.39.0 and will be removed in 4.0.') | ||
->args([ | ||
'%kernel.cache_dir%', | ||
'%kernel.debug%', | ||
]) | ||
|
||
->set(ExplainAdminCommand::class, ExplainAdminCommand::class) | ||
->public() | ||
->tag('console.command') | ||
->args([ | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
new ReferenceConfigurator('validator'), | ||
]) | ||
|
||
->set(GenerateObjectAclCommand::class, GenerateObjectAclCommand::class) | ||
->public() | ||
->tag('console.command') | ||
->args([ | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
[], | ||
(new ReferenceConfigurator('doctrine'))->nullOnInvalid(), | ||
]) | ||
|
||
->set(ListAdminCommand::class, ListAdminCommand::class) | ||
->public() | ||
->tag('console.command') | ||
->args([ | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
]) | ||
|
||
->set(SetupAclCommand::class, SetupAclCommand::class) | ||
->public() | ||
->tag('console.command') | ||
->args([ | ||
new ReferenceConfigurator('sonata.admin.pool'), | ||
new ReferenceConfigurator('sonata.admin.manipulator.acl.admin'), | ||
]) | ||
; | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.