Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Relay Formalize Bundle Laravel Package

dbp/relay-formalize-bundle

View on GitHub
Deep Wiki
Context7

Events

To extend the behavior of the bundle the following event is registered:

CreateSubmissionPostEvent

This event allows you to react to submissions, i.e. when submissions enter the submitted state. You can use this for example to send a registration confirmation to the registrant.

Example: Create an event subscriber instance (e.g. src/EventSubscriber/SubmissionSubmittedSubscriber.php) and register it as a service:

<?php

namespace App\EventSubscriber;

use Dbp\Relay\FormalizeBundle\Event\SubmissionSubmittedPostEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

class SubmissionSubmittedSubscriber implements EventSubscriberInterface
{
    public static function getSubscribedEvents(): array
    {
        return [
            SubmissionSubmittedPostEvent::class => 'onPost',
        ];
    }

    public function onPost(SubmissionSubmittedPostEvent $event)
    {
        $submission = $event->getSubmission();
        $dataFeedElement = $submission->getDataFeedElementDecoded();

        // e.g. write an email to the registrant
        $email = $dataFeedElement['email'] ?? null;
        ...
    }
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
bugban/symfony
beyonder-capi/workflow-extensions-bundle
beyonder-capi/job-queue-bundle
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin