Repository URL to install this package:
|
Version:
2.0.2 ▾
|
novicell/custom_forms
/
src
/
Plugin
/
CustomForms
/
SubmissionHandler
/
CustomFormsSubmissionHandlerBase.php
|
|---|
<?php
namespace Drupal\custom_forms\Plugin\CustomForms\SubmissionHandler;
use Drupal\Core\Plugin\PluginBase;
use Drupal\Core\Form\FormStateInterface;
use Drupal\custom_forms\CustomFormInterface;
use Drupal\custom_forms\Entity\CustomFormSubmissionHandlerInterface;
use Drupal\custom_forms\Entity\CustomFormSubmissionInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
/**
* Class CustomFormsSubmissionHandlerBase
*
* The base class for custom submission handler plugins, all group plugins must
* extend this class to ensure they function properly.
*
* @package Drupal\custom_forms\Plugin\CustomForms\FieldType
*/
abstract class CustomFormsSubmissionHandlerBase extends PluginBase implements CustomFormsSubmissionHandlerInterface {
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static(
$configuration,
$plugin_id,
$plugin_definition
);
}
/**
* {@inheritdoc}
*/
public function buildSettingsForm(CustomFormInterface $custom_form, array $form, FormStateInterface $form_state) : array {
return [];
}
/**
* {@inheritdoc}
*/
public function submitSettingsForm(CustomFormInterface $custom_form, array &$form, FormStateInterface $form_state): void {}
/**
* {@inheritdoc}
*/
abstract public function executeHandler(CustomFormSubmissionInterface $submission, CustomFormSubmissionHandlerInterface $handler_entity): void;
}