initial commit
This commit is contained in:
10
vendor/symfony/maker-bundle/templates/twig/Component.tpl.php
vendored
Normal file
10
vendor/symfony/maker-bundle/templates/twig/Component.tpl.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?= "<?php\n" ?>
|
||||
|
||||
namespace <?= $namespace; ?>;
|
||||
|
||||
use Symfony\UX\TwigComponent\Attribute\AsTwigComponent;
|
||||
|
||||
#[AsTwigComponent]
|
||||
final class <?= $class_name."\n" ?>
|
||||
{
|
||||
}
|
||||
25
vendor/symfony/maker-bundle/templates/twig/Extension.tpl.php
vendored
Normal file
25
vendor/symfony/maker-bundle/templates/twig/Extension.tpl.php
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
<?= "<?php\n" ?>
|
||||
|
||||
namespace <?= $namespace; ?>;
|
||||
|
||||
<?= $use_statements ?>
|
||||
|
||||
class <?= $class_name ?> extends AbstractExtension
|
||||
{
|
||||
public function getFilters(): array
|
||||
{
|
||||
return [
|
||||
// If your filter generates SAFE HTML, you should add a third
|
||||
// parameter: ['is_safe' => ['html']]
|
||||
// Reference: https://twig.symfony.com/doc/3.x/advanced.html#automatic-escaping
|
||||
new TwigFilter('filter_name', [<?= $runtime_class_name ?>::class, 'doSomething']),
|
||||
];
|
||||
}
|
||||
|
||||
public function getFunctions(): array
|
||||
{
|
||||
return [
|
||||
new TwigFunction('function_name', [<?= $runtime_class_name ?>::class, 'doSomething']),
|
||||
];
|
||||
}
|
||||
}
|
||||
12
vendor/symfony/maker-bundle/templates/twig/LiveComponent.tpl.php
vendored
Normal file
12
vendor/symfony/maker-bundle/templates/twig/LiveComponent.tpl.php
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?= "<?php\n" ?>
|
||||
|
||||
namespace <?= $namespace; ?>;
|
||||
|
||||
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
|
||||
use Symfony\UX\LiveComponent\DefaultActionTrait;
|
||||
|
||||
#[AsLiveComponent]
|
||||
final class <?= $class_name."\n" ?>
|
||||
{
|
||||
use DefaultActionTrait;
|
||||
}
|
||||
18
vendor/symfony/maker-bundle/templates/twig/Runtime.tpl.php
vendored
Normal file
18
vendor/symfony/maker-bundle/templates/twig/Runtime.tpl.php
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
<?= "<?php\n" ?>
|
||||
|
||||
namespace <?= $namespace; ?>;
|
||||
|
||||
<?= $use_statements ?>
|
||||
|
||||
class <?= $class_name ?> implements RuntimeExtensionInterface
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
// Inject dependencies if needed
|
||||
}
|
||||
|
||||
public function doSomething($value)
|
||||
{
|
||||
// ...
|
||||
}
|
||||
}
|
||||
3
vendor/symfony/maker-bundle/templates/twig/component_template.tpl.php
vendored
Normal file
3
vendor/symfony/maker-bundle/templates/twig/component_template.tpl.php
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<div{{ attributes }}>
|
||||
<!-- component HTML -->
|
||||
</div>
|
||||
Reference in New Issue
Block a user