src/system/BlocksModule/DependencyInjection/Compiler/BlockCollectorPass.php 1 location
|
@@ 18-39 (lines=22) @@
|
| 15 |
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 16 |
|
use Symfony\Component\DependencyInjection\Reference; |
| 17 |
|
|
| 18 |
|
class BlockCollectorPass implements CompilerPassInterface |
| 19 |
|
{ |
| 20 |
|
public function process(ContainerBuilder $container) |
| 21 |
|
{ |
| 22 |
|
if (!$container->hasDefinition('zikula_blocks_module.internal.block_collector')) { |
| 23 |
|
return; |
| 24 |
|
} |
| 25 |
|
|
| 26 |
|
$definition = $container->getDefinition('zikula_blocks_module.internal.block_collector'); |
| 27 |
|
|
| 28 |
|
foreach ($container->findTaggedServiceIds('zikula.block_handler') as $id => $tagParameters) { |
| 29 |
|
foreach ($tagParameters as $tagParameter) { |
| 30 |
|
if (!isset($tagParameter['module'])) { |
| 31 |
|
throw new \InvalidArgumentException(sprintf('Service "%s" must define the "module" attribute on "zikula.block_handler" tags.', $id)); |
| 32 |
|
} |
| 33 |
|
$module = $tagParameter['module']; |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
$definition->addMethodCall('add', [$module . ':' . $id, new Reference($id)]); |
| 37 |
|
} |
| 38 |
|
} |
| 39 |
|
} |
| 40 |
|
|
src/system/UsersModule/DependencyInjection/Compiler/AuthenticationMethodCollectorPass.php 1 location
|
@@ 18-39 (lines=22) @@
|
| 15 |
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 16 |
|
use Symfony\Component\DependencyInjection\Reference; |
| 17 |
|
|
| 18 |
|
class AuthenticationMethodCollectorPass implements CompilerPassInterface |
| 19 |
|
{ |
| 20 |
|
public function process(ContainerBuilder $container) |
| 21 |
|
{ |
| 22 |
|
if (!$container->hasDefinition('zikula_users_module.internal.authentication_method_collector')) { |
| 23 |
|
return; |
| 24 |
|
} |
| 25 |
|
|
| 26 |
|
$definition = $container->getDefinition('zikula_users_module.internal.authentication_method_collector'); |
| 27 |
|
|
| 28 |
|
foreach ($container->findTaggedServiceIds('zikula.authentication_method') as $id => $tagParameters) { |
| 29 |
|
foreach ($tagParameters as $tagParameter) { |
| 30 |
|
if (!isset($tagParameter['alias'])) { |
| 31 |
|
throw new \InvalidArgumentException(sprintf('Service "%s" must define the "alias" attribute on "zikula.authentication_method" tags.', $id)); |
| 32 |
|
} |
| 33 |
|
$alias = $tagParameter['alias']; |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
$definition->addMethodCall('add', [$alias, new Reference($id)]); |
| 37 |
|
} |
| 38 |
|
} |
| 39 |
|
} |
| 40 |
|
|
src/system/UsersModule/DependencyInjection/Compiler/MessageModuleCollectorPass.php 1 location
|
@@ 18-39 (lines=22) @@
|
| 15 |
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 16 |
|
use Symfony\Component\DependencyInjection\Reference; |
| 17 |
|
|
| 18 |
|
class MessageModuleCollectorPass implements CompilerPassInterface |
| 19 |
|
{ |
| 20 |
|
public function process(ContainerBuilder $container) |
| 21 |
|
{ |
| 22 |
|
if (!$container->hasDefinition('zikula_users_module.internal.message_module_collector')) { |
| 23 |
|
return; |
| 24 |
|
} |
| 25 |
|
|
| 26 |
|
$definition = $container->getDefinition('zikula_users_module.internal.message_module_collector'); |
| 27 |
|
|
| 28 |
|
foreach ($container->findTaggedServiceIds('zikula.message_module') as $id => $tagParameters) { |
| 29 |
|
foreach ($tagParameters as $tagParameter) { |
| 30 |
|
if (!isset($tagParameter['bundleName'])) { |
| 31 |
|
throw new \InvalidArgumentException(sprintf('Service "%s" must define the "bundleName" attribute on "zikula.message_module" tags.', $id)); |
| 32 |
|
} |
| 33 |
|
$bundleName = $tagParameter['bundleName']; |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
$definition->addMethodCall('add', [$bundleName, new Reference($id)]); |
| 37 |
|
} |
| 38 |
|
} |
| 39 |
|
} |
| 40 |
|
|
src/system/UsersModule/DependencyInjection/Compiler/ProfileModuleCollectorPass.php 1 location
|
@@ 18-39 (lines=22) @@
|
| 15 |
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 16 |
|
use Symfony\Component\DependencyInjection\Reference; |
| 17 |
|
|
| 18 |
|
class ProfileModuleCollectorPass implements CompilerPassInterface |
| 19 |
|
{ |
| 20 |
|
public function process(ContainerBuilder $container) |
| 21 |
|
{ |
| 22 |
|
if (!$container->hasDefinition('zikula_users_module.internal.profile_module_collector')) { |
| 23 |
|
return; |
| 24 |
|
} |
| 25 |
|
|
| 26 |
|
$definition = $container->getDefinition('zikula_users_module.internal.profile_module_collector'); |
| 27 |
|
|
| 28 |
|
foreach ($container->findTaggedServiceIds('zikula.profile_module') as $id => $tagParameters) { |
| 29 |
|
foreach ($tagParameters as $tagParameter) { |
| 30 |
|
if (!isset($tagParameter['bundleName'])) { |
| 31 |
|
throw new \InvalidArgumentException(sprintf('Service "%s" must define the "bundleName" attribute on "zikula.profile_module" tags.', $id)); |
| 32 |
|
} |
| 33 |
|
$bundleName = $tagParameter['bundleName']; |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
$definition->addMethodCall('add', [$bundleName, new Reference($id)]); |
| 37 |
|
} |
| 38 |
|
} |
| 39 |
|
} |
| 40 |
|
|
src/system/SearchModule/DependencyInjection/Compiler/SearchableModuleCollectorPass.php 1 location
|
@@ 18-39 (lines=22) @@
|
| 15 |
|
use Symfony\Component\DependencyInjection\ContainerBuilder; |
| 16 |
|
use Symfony\Component\DependencyInjection\Reference; |
| 17 |
|
|
| 18 |
|
class SearchableModuleCollectorPass implements CompilerPassInterface |
| 19 |
|
{ |
| 20 |
|
public function process(ContainerBuilder $container) |
| 21 |
|
{ |
| 22 |
|
if (!$container->hasDefinition('zikula_search_module.internal.searchable_module_collector')) { |
| 23 |
|
return; |
| 24 |
|
} |
| 25 |
|
|
| 26 |
|
$definition = $container->getDefinition('zikula_search_module.internal.searchable_module_collector'); |
| 27 |
|
|
| 28 |
|
foreach ($container->findTaggedServiceIds('zikula.searchable_module') as $id => $tagParameters) { |
| 29 |
|
foreach ($tagParameters as $tagParameter) { |
| 30 |
|
if (!isset($tagParameter['bundleName'])) { |
| 31 |
|
throw new \InvalidArgumentException(sprintf('Service "%s" must define the "bundleName" attribute on "zikula.searchable_module" tags.', $id)); |
| 32 |
|
} |
| 33 |
|
$bundleName = $tagParameter['bundleName']; |
| 34 |
|
} |
| 35 |
|
|
| 36 |
|
$definition->addMethodCall('add', [$bundleName, new Reference($id)]); |
| 37 |
|
} |
| 38 |
|
} |
| 39 |
|
} |
| 40 |
|
|