Events
namespace App\EventListener;
use SpomkyLabs\PwaBundle\Event\PreManifestCompileEvent;
use SpomkyLabs\PwaBundle\Event\PostManifestCompileEvent;
use Symfony\Component\EventDispatcher\Attribute\AsEventListener;
#[AsEventListener(event: PreManifestCompileEvent ::class, method: 'preCompile')]
#[AsEventListener(event: PostManifestCompileEvent::class, method: 'postCompile')]
final readonly class MyListener
{
public function preCompile(PreManifestCompileEvent $event): void
{
// ...
}
public function postCompile(PostManifestCompileEvent $event): void
{
// ...
}
}Was this helpful?