Remove explicit bundle config, re add template path, specify new name for badge component

This commit is contained in:
2024-08-08 12:44:10 +01:00
parent 193a8c4899
commit 4c234b3ec3
2 changed files with 1 additions and 9 deletions

View File

@@ -30,14 +30,6 @@ final class PcmBadgeBundle extends AbstractBundle
// ->get('pcm_example.greeting')
// ->arg('$name', $config['name'])
$builder->prependExtensionConfig('twig_component', [
'defaults' => [
'Pcm\BadgeBundle\Twig\Component\\' => [
'template_directory' => '@PcmBadge/components/',
'name_prefix' => 'Pcm',
],
],
]);
}
}

View File

@@ -6,7 +6,7 @@ namespace Pcm\BadgeBundle\Twig\Component;
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
#[AsTwigComponent(name: 'Badge')]
#[AsTwigComponent(name: 'Pcm:Badge', template: "@PcmBadge/components/Badge.html.twig")]
final class Badge
{
}