chrisbryan17's picture
Upload folder using huggingface_hub
d2897cd verified
raw
history blame contribute delete
691 Bytes
<?php
declare(strict_types=1);
namespace Mautic\CoreBundle\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
class PermissionsPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container): void
{
$corePermissions = $container->findDefinition('mautic.security');
foreach ($container->findTaggedServiceIds('mautic.permissions') as $id => $tags) {
$permissionObject = $container->findDefinition($id);
$corePermissions->addMethodCall('setPermissionObject', [$permissionObject]);
}
}
}