class HubspotWebformHandler in HubSpot 8
Same name and namespace in other branches
- 3.x src/Plugin/WebformHandler/HubspotWebformHandler.php \Drupal\hubspot\Plugin\WebformHandler\HubspotWebformHandler
Webform submission remote post handler.
Plugin annotation
@WebformHandler(
id = "hubspot_webform_handler",
label = @Translation("HubSpot Webform Handler"),
category = @Translation("External"),
description = @Translation("Sends a webform submission to a Hubspot form."),
cardinality = \Drupal\webform\Plugin\WebformHandlerInterface::CARDINALITY_UNLIMITED,
results = \Drupal\webform\Plugin\WebformHandlerInterface::RESULTS_PROCESSED,
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
- class \Drupal\webform\Plugin\WebformHandlerBase implements WebformHandlerInterface uses WebformPluginSettingsTrait
- class \Drupal\hubspot\Plugin\WebformHandler\HubspotWebformHandler
- class \Drupal\webform\Plugin\WebformHandlerBase implements WebformHandlerInterface uses WebformPluginSettingsTrait
- class \Drupal\Core\Plugin\PluginBase uses DependencySerializationTrait, MessengerTrait, StringTranslationTrait
Expanded class hierarchy of HubspotWebformHandler
1 file declares its use of HubspotWebformHandler
- hubspot.install in ./
hubspot.install - Installation file for hubspot.
File
- src/
Plugin/ WebformHandler/ HubspotWebformHandler.php, line 27
Namespace
Drupal\hubspot\Plugin\WebformHandlerView source
class HubspotWebformHandler extends WebformHandlerBase {
/**
* The node storage.
*
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
*/
protected $entityTypeManager;
/**
* The mail manager.
*
* @var \Drupal\Core\Mail\MailManagerInterface
*/
protected $mailManager;
/**
* Internal reference to the hubspot forms.
*
* @var \Drupal\hubspot\Hubspot
*/
protected $hubspot;
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
$instance = parent::create($container, $configuration, $plugin_id, $plugin_definition);
$instance->entityTypeManager = $container
->get('entity_type.manager');
$instance->mailManager = $container
->get('plugin.manager.mail');
$instance->hubspot = $container
->get('hubspot.hubspot');
return $instance;
}
/**
* {@inheritdoc}
*/
public function getSummary() : array {
return [];
}
/**
* {@inheritdoc}
*/
public function buildConfigurationForm(array $form, FormStateInterface $form_state) : array {
// First check if hubspot is connected.
if (!$this->hubspot
->isConfigured()) {
$form['mapping']['notice'] = [
'#type' => 'item',
'#title' => $this
->t('Notice'),
'#markup' => $this
->t('Your site account is not connected to a Hubspot account, please @admin_link first.', [
'@admin_link' => Link::createFromRoute('connect to Hubspot', 'hubspot.admin_settings'),
]),
];
return $form;
}
$settings = $this
->getSettings();
$default_hubspot_guid = $settings['form_guid'] ?? NULL;
$this->webform = $this
->getWebform();
$form['mapping'] = [
'#type' => 'fieldset',
'#title' => $this
->t('Field Mapping'),
];
$options = [
'--donotmap--' => 'Do Not Map',
];
try {
$hubspot_forms = $this->hubspot
->getHubspotForms();
} catch (GuzzleException $e) {
$this
->messenger()
->addWarning('Unable to load hubspot form info.');
return $form;
}
$hubspot_forms = array_column($hubspot_forms, NULL, 'guid');
$options = array_column($hubspot_forms, 'name', 'guid');
// Sort $options alphabetically and retain key (guid).
asort($options, SORT_STRING | SORT_FLAG_CASE);
// Select list of forms on hubspot.
$form['mapping']['hubspot_form'] = [
'#type' => 'select',
'#title' => $this
->t('Choose a hubspot form:'),
'#options' => $options,
'#default_value' => $default_hubspot_guid,
'#ajax' => [
'callback' => [
$this,
'showWebformFields',
],
'event' => 'change',
'wrapper' => 'field_mapping_list',
],
];
$form['mapping']['original_hubspot_id'] = [
'#type' => 'hidden',
'#value' => $default_hubspot_guid,
];
// Fieldset to contain mapping fields.
$form['mapping']['field_group'] = [
'#type' => 'fieldset',
'#title' => $this
->t('Fields to map for form: @label', [
'@label' => $this->webform
->label(),
]),
'#states' => [
'invisible' => [
':input[name="settings[mapping][hubspot_form]"]' => [
'value' => '--donotmap--',
],
],
],
];
$form['mapping']['field_group']['fields'] = [
'#type' => 'container',
'#prefix' => '<div id="field_mapping_list">',
'#suffix' => '</div>',
'#markup' => '',
];
$form_values = $form_state
->getValues();
// Apply default values if available.
if (!empty($form_values['mapping']['hubspot_form']) || !empty($default_hubspot_guid)) {
// Generally, these elements cannot be submitted to HubSpot.
$exclude_elements = [
'webform_actions',
'webform_flexbox',
'webform_markup',
'webform_more',
'webform_section',
'webform_wizard_page',
'webform_message',
'webform_horizontal_rule',
'webform_terms_of_service',
'webform_computed_token',
'webform_computed_twig',
'webform_element',
'processed_text',
'captcha',
'container',
'details',
'fieldset',
'item',
'label',
];
if (!empty($form_values['mapping']['hubspot_form'])) {
$hubspot_guid = $form_values['mapping']['hubspot_form'];
}
else {
$hubspot_guid = $default_hubspot_guid;
}
$hubspot_fields = $hubspot_forms[$hubspot_guid] ?? [];
$options = [
'--donotmap--' => 'Do Not Map',
];
foreach ($hubspot_fields['formFieldGroups'] as $hubspot_field) {
foreach ($hubspot_field['fields'] as $field) {
$options[$field['name']] = $field['label'];
}
}
$components = $this->webform
->getElementsInitializedAndFlattened();
foreach ($components as $webform_field => $value) {
if (!in_array($value['#type'], $exclude_elements)) {
if ($value['#webform_composite']) {
// Loop through a composite field to get all fields.
foreach ($value['#webform_composite_elements'] as $composite_field => $composite_value) {
$key = $webform_field . ':' . $composite_field;
$form['mapping']['field_group']['fields'][$key] = [
'#title' => (@$webform_field . ':' . $composite_value['#title'] ?: $key) . ' (' . $composite_value['#type'] . ')',
'#type' => 'select',
'#options' => $options,
];
if (isset($settings['field_mapping'][$key])) {
$form['mapping']['field_group']['fields'][$key]['#default_value'] = $settings['field_mapping'][$key];
}
}
}
else {
// Non composite element.
$form['mapping']['field_group']['fields'][$webform_field] = [
'#title' => (@$value['#title'] ?: $webform_field) . ' (' . $value['#type'] . ')',
'#type' => 'select',
'#options' => $options,
];
if (isset($settings['field_mapping'][$webform_field])) {
$form['mapping']['field_group']['fields'][$webform_field]['#default_value'] = $settings['field_mapping'][$webform_field];
}
}
}
}
}
return $form;
}
/**
* AJAX callback for hubspot form change event.
*
* @param array $form
* Active form array.
* @param \Drupal\Core\Form\FormStateInterface $form_state
* Active form state.
*
* @return array
* Render array.
*/
public function showWebformFields(array $form, FormStateInterface $form_state) : array {
return $form['settings']['mapping']['field_group']['fields'];
}
/**
* {@inheritdoc}
*/
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
if (!$this->hubspot
->isConfigured()) {
return;
}
$hubspot_id = $form_state
->getValues()['mapping']['hubspot_form'];
$fields = $form_state
->getValues()['mapping']['field_group']['fields'];
$settings = [];
// Add new field mapping.
if ($hubspot_id != '--donotmap--') {
$settings['form_guid'] = $hubspot_id;
$settings['field_mapping'] = array_filter($fields, function ($hubspot_field) {
return $hubspot_field !== '--donotmap--';
});
$this
->messenger()
->addMessage($this
->t('Saved new field mapping.'));
}
$this
->setSettings($settings);
}
/**
* {@inheritdoc}
*/
public function postSave(WebformSubmissionInterface $webform_submission, $update = TRUE) {
$operation = $update ? 'update' : 'insert';
$this
->remotePost($operation, $webform_submission);
}
/**
* Get hubspot settings.
*
* @return array
* An associative array containing hubspot configuration values.
*/
public function getSettings() : array {
$configuration = $this
->getConfiguration();
return $configuration['settings'] ?? [];
}
/**
* Set hubspot settings.
*
* @param array $settings
* An associative array containing hubspot configuration values.
*/
public function setSettings(array $settings) {
$configuration = $this
->getConfiguration();
$configuration['settings'] = $settings;
$this
->setConfiguration($configuration);
}
/**
* Execute a remote post.
*
* @param string $operation
* The type of webform submission operation to be posted. Can be 'insert',
* 'update', or 'delete'.
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* The webform submission to be posted.
*/
protected function remotePost($operation, WebformSubmissionInterface $webform_submission) {
// Get the hubspot config settings.
$request_post_data = $this
->getPostData($operation, $webform_submission);
$entity_type = $request_post_data['entity_type'];
$context = [];
// Get webform.
$webform = $this
->getWebform();
// Get all components.
$elements = $webform
->getElementsDecodedAndFlattened();
// Loop through components and set new value for checkbox fields.
foreach ($elements as $component_key => $component) {
if ($component['#type'] == 'checkbox') {
$webform_submission
->setElementData($component_key, $webform_submission
->getElementData($component_key) ? 'true' : 'false');
}
}
if ($entity_type) {
$entity_storage = $this->entityTypeManager
->getStorage($entity_type);
$entity = $entity_storage
->load($request_post_data['entity_id']);
$form_title = $entity
->label();
$context['pageUrl'] = Url::fromUserInput($request_post_data['uri'], [
'absolute' => TRUE,
])
->toString();
}
else {
// Case 2: Webform it self.
// Webform title.
$form_title = $this
->getWebform()
->label();
$context['pageUrl'] = $this->webform
->toUrl('canonical', [
'absolute' => TRUE,
])
->toString();
}
$settings = $this
->getSettings();
$form_guid = $settings['form_guid'];
$field_mapping = $settings['field_mapping'];
$webform_values = $webform_submission
->getData();
$form_values = [];
foreach ($field_mapping as $webform_path => $hubspot_field) {
if ($hubspot_field != '--donotmap--') {
if (strpos($webform_path, ':') !== FALSE) {
// Is composite element.
$composite = explode(':', $webform_path);
$composite_value = NestedArray::getValue($webform_values, $composite);
$form_values[$hubspot_field] = $composite_value;
}
else {
// Not a composite element.
$form_values[$hubspot_field] = $webform_values[$webform_path];
}
}
}
try {
$hubspot_response = $this->hubspot
->submitHubspotForm($form_guid, $form_values, $context);
$response = $hubspot_response['response'] ?? NULL;
// Debugging information.
$config = $this->configFactory
->get('hubspot.settings');
$hubspot_url = 'https://app.hubspot.com';
$to = $config
->get('hubspot_debug_email');
$default_language = \Drupal::languageManager()
->getDefaultLanguage()
->getId();
$from = $config
->get('site_mail');
if ($response) {
$data = (string) $response
->getBody();
if ($response
->getStatusCode() == '200' || $response
->getStatusCode() == '204') {
$this->loggerFactory
->get('HubSpot')
->notice('Webform "@form" results successfully submitted to HubSpot.', [
'@form' => $form_title,
]);
}
else {
$this->loggerFactory
->get('HubSpot')
->notice('HTTP notice when submitting HubSpot data from Webform "@form". @code: <pre>@msg</pre>', [
'@form' => $form_title,
'@code' => $response
->getStatusCode(),
'@msg' => $response
->getBody()
->getContents(),
]);
}
if ($config
->get('hubspot_debug_on')) {
$this->mailManager
->mail('hubspot', 'hub_error', $to, $default_language, [
'errormsg' => $data,
'hubspot_url' => $hubspot_url,
'node_title' => $form_title,
], $from);
}
}
else {
$this->loggerFactory
->get('HubSpot')
->notice('HTTP error when submitting HubSpot data from Webform "@form": <pre>@msg</pre>', [
'@form' => $form_title,
'@msg' => $hubspot_response['error'],
]);
}
} catch (RequestException $e) {
$this->loggerFactory
->get('HubSpot')
->notice('HTTP error when submitting HubSpot data from Webform "@form": <pre>@error</pre>', [
'@form' => $form_title,
'@error' => $e
->getResponse()
->getBody()
->getContents(),
]);
watchdog_exception('HubSpot', $e);
} catch (GuzzleException $e) {
$this->loggerFactory
->get('HubSpot')
->notice('HTTP error when submitting HubSpot data from Webform "@form": <pre>@error</pre>', [
'@form' => $form_title,
'@error' => $e
->getMessage(),
]);
watchdog_exception('HubSpot', $e);
}
}
/**
* Get a webform submission's post data.
*
* @param string $operation
* The type of webform submission operation to be posted. Can be 'insert',
* 'update', or 'delete'.
* @param \Drupal\webform\WebformSubmissionInterface $webform_submission
* The webform submission to be posted.
*
* @return array
* A webform submission converted to an associative array.
*/
protected function getPostData($operation, WebformSubmissionInterface $webform_submission) {
// Get submission and elements data.
$data = $webform_submission
->toArray(TRUE);
// Flatten data.
// Prioritizing elements before the submissions fields.
$data = $data['data'] + $data;
unset($data['data']);
return $data;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | 1 | |
DependencySerializationTrait:: |
public | function | 2 | |
HubspotWebformHandler:: |
protected | property | The node storage. | |
HubspotWebformHandler:: |
protected | property | Internal reference to the hubspot forms. | |
HubspotWebformHandler:: |
protected | property | The mail manager. | |
HubspotWebformHandler:: |
public | function |
Form constructor. Overrides WebformHandlerBase:: |
|
HubspotWebformHandler:: |
public static | function |
Creates an instance of the plugin. Overrides WebformHandlerBase:: |
|
HubspotWebformHandler:: |
protected | function | Get a webform submission's post data. | |
HubspotWebformHandler:: |
public | function |
Get hubspot settings. Overrides WebformPluginSettingsTrait:: |
|
HubspotWebformHandler:: |
public | function |
Returns a render array summarizing the configuration of the webform handler. Overrides WebformHandlerBase:: |
|
HubspotWebformHandler:: |
public | function |
Acts on a saved webform submission before the insert or update hook is invoked. Overrides WebformHandlerBase:: |
|
HubspotWebformHandler:: |
protected | function | Execute a remote post. | |
HubspotWebformHandler:: |
public | function |
Set hubspot settings. Overrides WebformPluginSettingsTrait:: |
|
HubspotWebformHandler:: |
public | function | AJAX callback for hubspot form change event. | |
HubspotWebformHandler:: |
public | function |
Form submission handler. Overrides WebformHandlerBase:: |
|
MessengerTrait:: |
protected | property | The messenger. | 29 |
MessengerTrait:: |
public | function | Gets the messenger. | 29 |
MessengerTrait:: |
public | function | Sets the messenger. | |
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. | |
StringTranslationTrait:: |
protected | property | The string translation service. | 1 |
StringTranslationTrait:: |
protected | function | Formats a string containing a count of items. | |
StringTranslationTrait:: |
protected | function | Returns the number of plurals supported by a given language. | |
StringTranslationTrait:: |
protected | function | Gets the string translation service. | |
StringTranslationTrait:: |
public | function | Sets the string translation service to use. | 2 |
StringTranslationTrait:: |
protected | function | Translates a string to the current language or to a given language. | |
WebformHandlerBase:: |
protected | property | The webform handler's conditions. | |
WebformHandlerBase:: |
protected | property | The webform handler's conditions result cache. | |
WebformHandlerBase:: |
protected | property | The webform submission (server-side) conditions (#states) validator. | |
WebformHandlerBase:: |
protected | property | The configuration factory. | 1 |
WebformHandlerBase:: |
protected | property | The webform handler ID. | |
WebformHandlerBase:: |
protected | property | The webform handler label. | |
WebformHandlerBase:: |
protected | property | The logger factory. | |
WebformHandlerBase:: |
protected | property | The webform variant notes. | |
WebformHandlerBase:: |
protected | property | The webform handler status. | |
WebformHandlerBase:: |
protected | property | The webform submission storage. | |
WebformHandlerBase:: |
protected | property | The webform token manager. | 6 |
WebformHandlerBase:: |
protected | property | The webform. | |
WebformHandlerBase:: |
protected | property | The webform submission. | |
WebformHandlerBase:: |
protected | property | The weight of the webform handler. | |
WebformHandlerBase:: |
public | function |
Controls entity operation access to webform submission. Overrides WebformHandlerInterface:: |
1 |
WebformHandlerBase:: |
public | function |
Controls entity operation access to webform submission element. Overrides WebformHandlerInterface:: |
1 |
WebformHandlerBase:: |
public | function |
Alter webform element. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
public | function |
Alter webform submission webform elements. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
public | function |
Alter webform submission form. Overrides WebformHandlerInterface:: |
3 |
WebformHandlerBase:: |
protected | function | Apply submitted form state to configuration. | |
WebformHandlerBase:: |
protected | function | Build token tree element. | 2 |
WebformHandlerBase:: |
public | function |
Returns the webform handler cardinality settings. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Check handler conditions against a webform submission. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Confirm webform submission form. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
public | function |
Acts on a element after it has been created. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
public | function |
Acts on handler after it has been created and added to webform. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
public | function |
Gets default configuration for this plugin. Overrides ConfigurableInterface:: |
9 |
WebformHandlerBase:: |
public | function |
Acts on a element after it has been deleted. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
public | function |
Acts on handler after it has been removed. Overrides WebformHandlerInterface:: |
3 |
WebformHandlerBase:: |
public | function |
Returns the webform handler description. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Disables the webform handler. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
protected | function | Validate form that should have tokens in it. | |
WebformHandlerBase:: |
public | function |
Enables the webform handler. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Returns the conditions the webform handler. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Gets this plugin's configuration. Overrides ConfigurableInterface:: |
|
WebformHandlerBase:: |
public | function |
Returns the unique ID representing the webform handler. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Returns the label of the webform handler. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
protected | function | Get webform or webform_submission logger. | |
WebformHandlerBase:: |
public | function |
Returns notes of the webform variant. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Get configuration form's off-canvas width. Overrides WebformHandlerInterface:: |
1 |
WebformHandlerBase:: |
public | function |
Returns the status of the webform handler. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Get the webform that this handler is attached to. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Get the webform submission that this handler is handling. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Returns the weight of the webform handler. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Determine if the webform handler requires anonymous submission tracking. Overrides WebformHandlerInterface:: |
1 |
WebformHandlerBase:: |
public | function |
Determine if this handle is applicable to the webform. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Returns the webform handler disabled indicator. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Returns the webform handler enabled indicator. Overrides WebformHandlerInterface:: |
1 |
WebformHandlerBase:: |
public | function |
Checks if the handler is excluded via webform.settings. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Returns the webform submission is optional indicator. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Returns the webform submission is required indicator. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Returns the webform handler label. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
protected | function | Log a webform handler's submission operation. | |
WebformHandlerBase:: |
public | function |
Alter/override a webform submission webform settings. Overrides WebformHandlerInterface:: |
3 |
WebformHandlerBase:: |
public | function |
Acts on a webform submission after it is created. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
public | function |
Acts on deleted a webform submission before the delete hook is invoked. Overrides WebformHandlerInterface:: |
4 |
WebformHandlerBase:: |
public | function |
Acts on loaded webform submission. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
public | function |
Acts on webform submissions after they are purged. Overrides WebformHandlerInterface:: |
1 |
WebformHandlerBase:: |
public | function |
Changes the values of an entity before it is created. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
public | function |
Acts on a webform submission before they are deleted and before hooks are invoked. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
public | function |
Acts on an webform submission about to be shown on a webform submission form. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Prepares variables for webform confirmation templates. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
public | function |
Acts on webform submissions before they are purged. Overrides WebformHandlerInterface:: |
1 |
WebformHandlerBase:: |
public | function |
Acts on a webform submission before the presave hook is invoked. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
protected | function | Replace tokens in text with no render context. | |
WebformHandlerBase:: |
public | function |
Sets the conditions for this webform handler. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Sets the configuration for this plugin instance. Overrides ConfigurableInterface:: |
1 |
WebformHandlerBase:: |
public | function |
Sets the id for this webform handler. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Sets the label for this webform handler. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Set notes for this webform variant. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
protected | function | Set configuration settings parents. | |
WebformHandlerBase:: |
protected | function | Set configuration settings parents. | |
WebformHandlerBase:: |
public | function |
Sets the status for this webform handler. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Set the webform that this is handler is attached to. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Set the webform submission that this handler is handling. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Sets the weight for this webform handler. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Submit webform submission form. Overrides WebformHandlerInterface:: |
4 |
WebformHandlerBase:: |
public | function |
Determine if webform handler supports conditions. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Determine if webform handler supports tokens. Overrides WebformHandlerInterface:: |
|
WebformHandlerBase:: |
public | function |
Acts on a element after it has been updated. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
public | function |
Acts on handler after it has been updated. Overrides WebformHandlerInterface:: |
3 |
WebformHandlerBase:: |
public | function |
Form validation handler. Overrides PluginFormInterface:: |
3 |
WebformHandlerBase:: |
public | function |
Validate webform submission form. Overrides WebformHandlerInterface:: |
2 |
WebformHandlerBase:: |
public | function |
Constructs a WebformHandlerBase object. Overrides PluginBase:: |
7 |
WebformHandlerInterface:: |
constant | Value indicating a single plugin instances are permitted. | ||
WebformHandlerInterface:: |
constant | Value indicating unlimited plugin instances are permitted. | ||
WebformHandlerInterface:: |
constant | Value indicating webform submissions are not processed (i.e. email or saved) by the handler. | ||
WebformHandlerInterface:: |
constant | Value indicating webform submissions are processed (i.e. email or saved) by the handler. | ||
WebformHandlerInterface:: |
constant | Value indicating webform submissions do not have to be stored in the database. | ||
WebformHandlerInterface:: |
constant | Value indicating webform submissions must be stored in the database. | ||
WebformPluginSettingsTrait:: |
public | function | ||
WebformPluginSettingsTrait:: |
public | function |