interface WebformVariantInterface in Webform 6.x
Same name and namespace in other branches
- 8.5 src/Plugin/WebformVariantInterface.php \Drupal\webform\Plugin\WebformVariantInterface
Defines the interface for webform variants.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface; interface \Drupal\Component\Plugin\ConfigurableInterface; interface \Drupal\Core\Plugin\ContainerFactoryPluginInterface; interface \Drupal\Core\Plugin\PluginFormInterface; interface \Drupal\webform\Plugin\WebformEntityInjectionInterface; interface \Drupal\webform\Plugin\WebformPluginSettingsInterface
- interface \Drupal\webform\Plugin\WebformVariantInterface
Expanded class hierarchy of WebformVariantInterface
All classes that implement WebformVariantInterface
See also
\Drupal\webform\Annotation\WebformVariant
\Drupal\webform\Plugin\WebformVariantBase
\Drupal\webform\Plugin\WebformVariantManager
\Drupal\webform\Plugin\WebformVariantManagerInterface
2 files declare their use of WebformVariantInterface
- Webform.php in src/
Entity/ Webform.php - WebformInterface.php in src/
WebformInterface.php
File
- src/
Plugin/ WebformVariantInterface.php, line 20
Namespace
Drupal\webform\PluginView source
interface WebformVariantInterface extends PluginInspectionInterface, ConfigurableInterface, ContainerFactoryPluginInterface, PluginFormInterface, WebformEntityInjectionInterface, WebformPluginSettingsInterface {
/**
* Returns a render array summarizing the configuration of the webform variant.
*
* @return array
* A render array.
*/
public function getSummary();
/**
* Returns the webform variant label.
*
* @return string
* The webform variant label.
*/
public function label();
/**
* Returns the webform variant description.
*
* @return string
* The webform variant description.
*/
public function description();
/**
* Returns the webform variant machine name replacement pattern.
*
* @return string|NULL
* The webform variant machine name replacement pattern.
*/
public function getMachineNameReplacePattern();
/**
* Returns the webform variant machine name replacement character.
*
* @return string|NULL
* The webform variant machine name replacement character.
*/
public function getMachineNameReplace();
/**
* Returns the unique ID representing the webform variant.
*
* @return string
* The webform variant ID.
*/
public function getVariantId();
/**
* Sets the id for this webform variant.
*
* @param int $variant_id
* The variant_id for this webform variant.
*
* @return $this
*/
public function setVariantId($variant_id);
/**
* Returns the element key of the webform variant.
*
* @return string
* The webform element key.
*/
public function getElementKey();
/**
* Sets the element key of this webform variant.
*
* @param int $element_key
* The element key for this webform variant.
*
* @return $this
*/
public function setElementKey($element_key);
/**
* Returns the label of the webform variant.
*
* @return string
* The label of the webform variant, or an empty string.
*/
public function getLabel();
/**
* Sets the label for this webform variant.
*
* @param string $label
* The label for this webform variant.
*
* @return $this
*/
public function setLabel($label);
/**
* Returns notes of the webform variant.
*
* @return string
* Notes for the webform variant, or an empty string.
*/
public function getNotes();
/**
* Set notes for this webform variant.
*
* @param string $notes
* Notes for this webform variant.
*
* @return $this
*/
public function setNotes($notes);
/**
* Returns the weight of the webform variant.
*
* @return int|string
* Either the integer weight of the webform variant, or an empty string.
*/
public function getWeight();
/**
* Sets the weight for this webform variant.
*
* @param int $weight
* The weight for this webform variant.
*
* @return $this
*/
public function setWeight($weight);
/**
* Returns the status of the webform variant.
*
* @return bool
* The status of the webform variant.
*/
public function getStatus();
/**
* Sets the status for this webform variant.
*
* @param bool $status
* The status for this webform variant.
*
* @return $this
*/
public function setStatus($status);
/**
* Enables the webform variant.
*
* @return $this
*/
public function enable();
/**
* Disables the webform variant.
*
* @return $this
*/
public function disable();
/**
* Checks if the variant is excluded via webform.settings.
*
* @return bool
* TRUE if the variant is excluded.
*/
public function isExcluded();
/**
* Returns the webform variant enabled indicator.
*
* @return bool
* TRUE if the webform variant is enabled.
*/
public function isEnabled();
/**
* Returns the webform variant disabled indicator.
*
* @return bool
* TRUE if the webform variant is disabled.
*/
public function isDisabled();
/**
* Determine if this variant is applicable to the webform.
*
* @param \Drupal\webform\WebformInterface $webform
* A webform.
*
* @return bool
* TRUE if this variant is applicable to the webform.
*/
public function isApplicable(WebformInterface $webform);
/**
* Get configuration form's off-canvas width.
*
* @return string
* The off-canvas width.
*
* @see WebformDialogHelper::DIALOG_NARROW
* @see WebformDialogHelper::DIALOG_NORMAL
* @see WebformDialogHelper::DIALOG_WIDE
* @see WebformDialogHelper::DIALOG_NONE
*/
public function getOffCanvasWidth();
/**
* Apply variant to the webform.
*
* @return bool
* TRUE if this variant was applied to the webform.
*/
public function applyVariant();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 14 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 15 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 15 |
ContainerFactoryPluginInterface:: |
public static | function | Creates an instance of the plugin. | 120 |
PluginFormInterface:: |
public | function | Form constructor. | 37 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
WebformEntityInjectionInterface:: |
public | function | Get the webform that this handler is attached to. | |
WebformEntityInjectionInterface:: |
public | function | Get the webform submission that this handler is handling. | |
WebformEntityInjectionInterface:: |
public | function | Reset webform and webform submission entity. | |
WebformEntityInjectionInterface:: |
public | function | Set webform and webform submission entity. | |
WebformEntityInjectionInterface:: |
public | function | Set the webform that this is handler is attached to. | |
WebformEntityInjectionInterface:: |
public | function | Set the webform submission that this handler is handling. | |
WebformPluginSettingsInterface:: |
public | function | Returns the plugin setting for given key | |
WebformPluginSettingsInterface:: |
public | function | Returns the plugin's settings. | |
WebformPluginSettingsInterface:: |
public | function | Sets a plugin setting for a given key. | |
WebformPluginSettingsInterface:: |
public | function | Update a plugin's settings. | |
WebformVariantInterface:: |
public | function | Apply variant to the webform. | 1 |
WebformVariantInterface:: |
public | function | Returns the webform variant description. | 1 |
WebformVariantInterface:: |
public | function | Disables the webform variant. | 1 |
WebformVariantInterface:: |
public | function | Enables the webform variant. | 1 |
WebformVariantInterface:: |
public | function | Returns the element key of the webform variant. | 1 |
WebformVariantInterface:: |
public | function | Returns the label of the webform variant. | 1 |
WebformVariantInterface:: |
public | function | Returns the webform variant machine name replacement character. | 1 |
WebformVariantInterface:: |
public | function | Returns the webform variant machine name replacement pattern. | 1 |
WebformVariantInterface:: |
public | function | Returns notes of the webform variant. | 1 |
WebformVariantInterface:: |
public | function | Get configuration form's off-canvas width. | 1 |
WebformVariantInterface:: |
public | function | Returns the status of the webform variant. | 1 |
WebformVariantInterface:: |
public | function | Returns a render array summarizing the configuration of the webform variant. | 1 |
WebformVariantInterface:: |
public | function | Returns the unique ID representing the webform variant. | 1 |
WebformVariantInterface:: |
public | function | Returns the weight of the webform variant. | 1 |
WebformVariantInterface:: |
public | function | Determine if this variant is applicable to the webform. | 1 |
WebformVariantInterface:: |
public | function | Returns the webform variant disabled indicator. | 1 |
WebformVariantInterface:: |
public | function | Returns the webform variant enabled indicator. | 1 |
WebformVariantInterface:: |
public | function | Checks if the variant is excluded via webform.settings. | 1 |
WebformVariantInterface:: |
public | function | Returns the webform variant label. | 1 |
WebformVariantInterface:: |
public | function | Sets the element key of this webform variant. | 1 |
WebformVariantInterface:: |
public | function | Sets the label for this webform variant. | 1 |
WebformVariantInterface:: |
public | function | Set notes for this webform variant. | 1 |
WebformVariantInterface:: |
public | function | Sets the status for this webform variant. | 1 |
WebformVariantInterface:: |
public | function | Sets the id for this webform variant. | 1 |
WebformVariantInterface:: |
public | function | Sets the weight for this webform variant. | 1 |