mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-01 04:23:49 +00:00
make timeline & paginator service private
This commit is contained in:
@@ -120,6 +120,7 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface,
|
||||
$loader->load('services/phonenumber.yml');
|
||||
$loader->load('services/cache.yml');
|
||||
$loader->load('services/templating.yml');
|
||||
$loader->load('services/timeline.yml');
|
||||
|
||||
$this->configureCruds($container, $config['cruds'], $loader);
|
||||
}
|
||||
|
@@ -17,28 +17,28 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace Chill\MainBundle\DependencyInjection;
|
||||
namespace Chill\MainBundle\DependencyInjection\CompilerPass;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
|
||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||
use Symfony\Component\DependencyInjection\Reference;
|
||||
|
||||
/**
|
||||
* Add services taggued with `name: chill.timeline` to
|
||||
* timeline_builder service definition
|
||||
*
|
||||
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
||||
*/
|
||||
class TimelineCompilerClass implements CompilerPassInterface
|
||||
{
|
||||
public function process(ContainerBuilder $container)
|
||||
{
|
||||
if (!$container->hasDefinition('chill.main.timeline_builder')) {
|
||||
throw new \LogicException('service chill.main.timeline_builder '
|
||||
if (!$container->hasDefinition('chill_main.timeline_builder')) {
|
||||
throw new \LogicException('service chill_main.timeline_builder '
|
||||
. 'is not defined.');
|
||||
}
|
||||
|
||||
$definition = $container->getDefinition(
|
||||
'chill.main.timeline_builder'
|
||||
'chill_main.timeline_builder'
|
||||
);
|
||||
|
||||
$taggedServices = $container->findTaggedServiceIds(
|
||||
@@ -56,7 +56,7 @@ class TimelineCompilerClass implements CompilerPassInterface
|
||||
|
||||
$definition->addMethodCall(
|
||||
'addProvider',
|
||||
array($attributes["context"], $id)
|
||||
array($attributes["context"], $id, new Reference($id))
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user