Skip to main content

For developers

Events

In the namespace Pdir\PactumBundle\Event:

EventWhen
InvitationCreatedEventan invitation was created
OptInConfirmedEventthe customer confirmed the e-mail address
AgreementCompletedEventthe agreement was concluded
VersionPublishedEventa version was published

Custom placeholders

A class implementing Pdir\PactumBundle\Rendering\PlaceholderProviderInterface is registered automatically and provides additional placeholders for the contract text.

Notifications

For a different delivery channel, e.g. the Notification Center, replace the alias of Pdir\PactumBundle\Notification\NotificationDispatcherInterface. A ready-made Notification Center integration is planned for version 1.1.

Templates

All front-end, mail and PDF templates are Twig templates in the @Contao namespace (pactum/…) and can be overridden in your project, e.g.:

  • templates/pactum/mail/invitation.html.twig
  • templates/pactum/mail/text/invitation.txt.twig

Console commands

CommandPurpose
pactum:sample:import <template-id>import the sample text (DE/EN) as a draft
pactum:verify <agreement-id>verify checksums and evidence of an agreement
pactum:cleanuprun the clean-up manually

Tests

composer install
composer cs          # ECS
composer phpstan     # PHPStan level 8
composer test        # unit tests
PACTUM_TEST_DATABASE_URL=mysql://user:pass@127.0.0.1:3306/pactum_test composer test-functional