PHP code example of yiggle / form-wizard-bundle

1. Go to this page and download the library: Download yiggle/form-wizard-bundle library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

yiggle / form-wizard-bundle example snippets


#[AsWizardFieldType]
final class MyFieldTypeHandler implements WizardFieldTypeHandlerInterface
{
    public function getKey(): string
    {
        return 'my_type';
    }

    public function buildForm(FormBuilderInterface $builder, array $options): void
    {
        // Build Symfony form field
    }
}

#[AsPaymentProvider(alias: 'acme')]
final class AcmeProvider implements PaymentProviderInterface
{
    public function getAlias(): string
    {
        return 'acme';
    }

    public function startPayment(WizardSubmission $submission): ?string
    {
        // return checkout URL
    }

    public function fetchStatus(string $transactionId): PaymentStatus
    {
        // query provider
    }
}

#[AutoconfigureTag('yiggle_form_wizard.wizard_notifier')]
final class MyNotifier implements WizardNotifierInterface
{
}
bash
php bin/console doctrine:migrations:diff
php bin/console doctrine:migrations:migrate
bash
php bin/console sulu:admin:update-build