mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
[ticket/13961] Add ordered service collection
PHPBB3-13961
This commit is contained in:
@@ -37,7 +37,16 @@ class collection_pass implements CompilerPassInterface
|
||||
|
||||
foreach ($container->findTaggedServiceIds($data[0]['tag']) as $service_id => $service_data)
|
||||
{
|
||||
$definition->addMethodCall('add', array($service_id));
|
||||
if (substr($definition->getClass(), -strlen('ordered_service_collection')) === 'ordered_service_collection')
|
||||
{
|
||||
$arguments = array($service_id, $service_data[0]['order']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$arguments = array($service_id);
|
||||
}
|
||||
|
||||
$definition->addMethodCall('add', $arguments);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user