mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Remove ContainerAwareInterface from CustomFieldProvider.php
This commit is contained in:
parent
262b7c5db3
commit
1321f5c734
@ -11,9 +11,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\CustomFieldsBundle\Service;
|
||||
|
||||
use Symfony\Component\DependencyInjection\ContainerAwareInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
/**
|
||||
* Receive all the services tagged with 'chill.custom_field'.
|
||||
*
|
||||
@ -28,13 +25,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
* tags:
|
||||
* - { name: 'chill.custom_field', type: 'ICPC2' }
|
||||
*/
|
||||
class CustomFieldProvider implements ContainerAwareInterface
|
||||
class CustomFieldProvider
|
||||
{
|
||||
/**
|
||||
* @var Container The container
|
||||
*/
|
||||
private $container;
|
||||
|
||||
/**
|
||||
* @var array The services indexes by the type
|
||||
*/
|
||||
@ -78,18 +70,4 @@ class CustomFieldProvider implements ContainerAwareInterface
|
||||
|
||||
throw new \LogicException('the custom field with type '.$type.' is not found');
|
||||
}
|
||||
|
||||
/**
|
||||
* (non-PHPdoc).
|
||||
*
|
||||
* @see \Symfony\Component\DependencyInjection\ContainerAwareInterface::setContainer()
|
||||
*/
|
||||
public function setContainer(?ContainerInterface $container = null): void
|
||||
{
|
||||
if (null === $container) {
|
||||
throw new \LogicException('container should not be null');
|
||||
}
|
||||
|
||||
$this->container = $container;
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,8 @@ services:
|
||||
|
||||
chill.custom_field.provider:
|
||||
class: Chill\CustomFieldsBundle\Service\CustomFieldProvider
|
||||
calls:
|
||||
- [setContainer, ["@service_container"]]
|
||||
# calls:
|
||||
# - [setContainer, ["@service_container"]]
|
||||
|
||||
Chill\CustomFieldsBundle\Service\CustomFieldProvider: '@chill.custom_field.provider'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user