initial commit
This commit is contained in:
14
vendor/symfony/maker-bundle/templates/event/Listener.tpl.php
vendored
Normal file
14
vendor/symfony/maker-bundle/templates/event/Listener.tpl.php
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
<?= "<?php\n" ?>
|
||||
|
||||
namespace <?= $namespace; ?>;
|
||||
|
||||
<?= $use_statements; ?>
|
||||
|
||||
final class <?= $class_name."\n" ?>
|
||||
{
|
||||
#[AsEventListener<?php if (!$class_event): ?>(event: <?= $event ?>)<?php endif ?>]
|
||||
public function <?= $method_name ?>(<?= $event_arg ?>): void
|
||||
{
|
||||
// ...
|
||||
}
|
||||
}
|
||||
20
vendor/symfony/maker-bundle/templates/event/Subscriber.tpl.php
vendored
Normal file
20
vendor/symfony/maker-bundle/templates/event/Subscriber.tpl.php
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
<?= "<?php\n" ?>
|
||||
|
||||
namespace <?= $namespace; ?>;
|
||||
|
||||
<?= $use_statements; ?>
|
||||
|
||||
class <?= $class_name ?> implements EventSubscriberInterface
|
||||
{
|
||||
public function <?= $method_name ?>(<?= $event_arg ?>): void
|
||||
{
|
||||
// ...
|
||||
}
|
||||
|
||||
public static function getSubscribedEvents(): array
|
||||
{
|
||||
return [
|
||||
<?= $event ?> => '<?= $method_name ?>',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user