Remove explicit bundle config, re add template path, specify new name for badge component
This commit is contained in:
@@ -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',
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user