You are here

class WebformHandler in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Annotation/WebformHandler.php \Drupal\webform\Annotation\WebformHandler

Defines a webform handler annotation object.

Plugin Namespace: Plugin\WebformHandler.

For a working example, see \Drupal\webform\Plugin\WebformHandler\EmailWebformHandler

Hierarchy

Expanded class hierarchy of WebformHandler

See also

hook_webform_handler_info_alter()

\Drupal\webform\Plugin\WebformHandlerInterface

\Drupal\webform\Plugin\WebformHandlerBase

\Drupal\webform\Plugin\WebformHandlerManager

Plugin API

13 classes are annotated with WebformHandler
ActionWebformHandler in src/Plugin/WebformHandler/ActionWebformHandler.php
Webform submission action handler.
BrokenWebformHandler in src/Plugin/WebformHandler/BrokenWebformHandler.php
Defines a fallback plugin for missing webform handler plugins.
DebugWebformHandler in src/Plugin/WebformHandler/DebugWebformHandler.php
Webform submission debug handler.
EmailWebformHandler in src/Plugin/WebformHandler/EmailWebformHandler.php
Emails a webform submission.
ExampleWebformHandler in modules/webform_example_handler/src/Plugin/WebformHandler/ExampleWebformHandler.php
Webform example handler.

... See full list

File

src/Annotation/WebformHandler.php, line 24

Namespace

Drupal\webform\Annotation
View source
class WebformHandler extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The human-readable name of the webform handler.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $label;

  /**
   * The category in the admin UI where the block will be listed.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $category = '';

  /**
   * A brief description of the webform handler.
   *
   * This will be shown when adding or configuring this webform handler.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $description = '';

  /**
   * The maximum number of instances allowed for this webform handler.
   *
   * Possible values are positive integers or
   * \Drupal\webform\Plugin\WebformHandlerInterface::CARDINALITY_UNLIMITED or
   * \Drupal\webform\Plugin\WebformHandlerInterface::CARDINALITY_SINGLE.
   *
   * @var int
   */
  public $cardinality = WebformHandlerInterface::CARDINALITY_UNLIMITED;

  /**
   * Notifies the webform that this handler processes results.
   *
   * When set to TRUE, 'Disable saving of submissions.' can be set.
   *
   * @var bool
   */
  public $results = WebformHandlerInterface::RESULTS_IGNORED;

  /**
   * Indicated whether handler supports condition logic.
   *
   * Most handlers will support conditional logic, this flat allows custom
   * handlers and custom modules to easily disabled conditional logic for
   * a handler.
   *
   * @var bool
   */
  public $conditions = TRUE;

  /**
   * Indicated whether handler supports tokens.
   *
   * @var bool
   */
  public $tokens = FALSE;

  /**
   * Indicated whether submission must be stored in the database for this handler processes results.
   *
   * @var bool
   */
  public $submission = WebformHandlerInterface::SUBMISSION_OPTIONAL;

}

Members

Namesort descending Modifiers Type Description Overrides
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2
WebformHandler::$cardinality public property The maximum number of instances allowed for this webform handler.
WebformHandler::$category public property The category in the admin UI where the block will be listed.
WebformHandler::$conditions public property Indicated whether handler supports condition logic.
WebformHandler::$description public property A brief description of the webform handler.
WebformHandler::$id public property The plugin ID.
WebformHandler::$label public property The human-readable name of the webform handler.
WebformHandler::$results public property Notifies the webform that this handler processes results.
WebformHandler::$submission public property Indicated whether submission must be stored in the database for this handler processes results.
WebformHandler::$tokens public property Indicated whether handler supports tokens.