-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Showing
16 changed files
with
843 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Sonata Project package. | ||
* | ||
* (c) Thomas Rabaix <[email protected]> | ||
* | ||
* 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 function Symfony\Component\DependencyInjection\Loader\Configurator\ref; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
$services = $containerConfigurator->services(); | ||
|
||
$services->set(DashboardAction::class, DashboardAction::class) | ||
->public() | ||
->args([ | ||
'%sonata.admin.configuration.dashboard_blocks%', | ||
ref('sonata.admin.breadcrumbs_builder'), | ||
ref('sonata.admin.global_template_registry'), | ||
ref('sonata.admin.pool'), | ||
ref('twig'), | ||
]); | ||
|
||
$services->set(SearchAction::class, SearchAction::class) | ||
->public() | ||
->args([ | ||
ref('sonata.admin.pool'), | ||
ref('sonata.admin.search.handler'), | ||
ref('sonata.admin.global_template_registry'), | ||
ref('sonata.admin.breadcrumbs_builder'), | ||
ref('twig'), | ||
]); | ||
|
||
$services->set('sonata.admin.action.append_form_field_element', AppendFormFieldElementAction::class) | ||
->public() | ||
->args([ | ||
ref('twig'), | ||
ref('sonata.admin.pool'), | ||
ref('sonata.admin.helper'), | ||
]); | ||
|
||
$services->set('sonata.admin.action.retrieve_form_field_element', RetrieveFormFieldElementAction::class) | ||
->public() | ||
->args([ref('twig'), ref('sonata.admin.pool'), ref('sonata.admin.helper')]); | ||
|
||
$services->set('sonata.admin.action.get_short_object_description', GetShortObjectDescriptionAction::class) | ||
->public() | ||
->args([ref('twig'), ref('sonata.admin.pool')]); | ||
|
||
$services->set('sonata.admin.action.set_object_field_value', SetObjectFieldValueAction::class) | ||
->public() | ||
->args([ref('twig'), ref('sonata.admin.pool'), ref('validator')]); | ||
|
||
$services->set('sonata.admin.action.retrieve_autocomplete_items', RetrieveAutocompleteItemsAction::class) | ||
->public() | ||
->args([ref('sonata.admin.pool')]); | ||
}; |
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,48 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Sonata Project package. | ||
* | ||
* (c) Thomas Rabaix <[email protected]> | ||
* | ||
* 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 function Symfony\Component\DependencyInjection\Loader\Configurator\ref; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
$services = $containerConfigurator->services(); | ||
|
||
$services->set('sonata.admin.block.admin_list', AdminListBlockService::class) | ||
->public() | ||
->tag('sonata.block', []) | ||
->args([ | ||
ref('twig'), | ||
ref('sonata.admin.pool'), | ||
ref('sonata.admin.global_template_registry'), | ||
]); | ||
|
||
$services->set('sonata.admin.block.search_result', AdminSearchBlockService::class) | ||
->public() | ||
->tag('sonata.block', []) | ||
->args([ | ||
ref('twig'), | ||
ref('sonata.admin.pool'), | ||
ref('sonata.admin.search.handler'), | ||
]); | ||
|
||
$services->set('sonata.admin.block.stats', AdminStatsBlockService::class) | ||
->public() | ||
->tag('sonata.block', []) | ||
->args([ | ||
ref('twig'), | ||
ref('sonata.admin.pool'), | ||
]); | ||
}; |
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,50 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Sonata Project package. | ||
* | ||
* (c) Thomas Rabaix <[email protected]> | ||
* | ||
* 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 function Symfony\Component\DependencyInjection\Loader\Configurator\ref; | ||
|
||
return static function (ContainerConfigurator $containerConfigurator): void { | ||
$services = $containerConfigurator->services(); | ||
|
||
$services->set(CreateClassCacheCommand::class, CreateClassCacheCommand::class) | ||
->public() | ||
->tag('console.command', ['command' => 'cache:create-cache-class']) | ||
->deprecate('The "%service_id%" service is deprecated since version sonata-project/admin-bundle 3.39.0 and will be removed in 4.0.') | ||
->args(['%kernel.cache_dir%', '%kernel.debug%']); | ||
|
||
$services->set(ExplainAdminCommand::class, ExplainAdminCommand::class) | ||
->public() | ||
->tag('console.command') | ||
->args([ref('sonata.admin.pool'), ref('validator')]); | ||
|
||
$services->set(GenerateObjectAclCommand::class, GenerateObjectAclCommand::class) | ||
->public() | ||
->tag('console.command') | ||
->args([ref('sonata.admin.pool'), [], ref('doctrine')->nullOnInvalid()]); | ||
|
||
$services->set(ListAdminCommand::class, ListAdminCommand::class) | ||
->public() | ||
->tag('console.command') | ||
->args([ref('sonata.admin.pool')]); | ||
|
||
$services->set(SetupAclCommand::class, SetupAclCommand::class) | ||
->public() | ||
->tag('console.command') | ||
->args([ref('sonata.admin.pool'), ref('sonata.admin.manipulator.acl.admin')]); | ||
}; |
Oops, something went wrong.