You are here

class YamlFormElement in YAML Form 8

Same name in this branch
  1. 8 src/Annotation/YamlFormElement.php \Drupal\yamlform\Annotation\YamlFormElement
  2. 8 src/Plugin/YamlFormElement/YamlFormElement.php \Drupal\yamlform\Plugin\YamlFormElement\YamlFormElement

Defines a form element annotation object.

Plugin Namespace: Plugin\YamlFormElement.

For a working example, see \Drupal\yamlform\Plugin\YamlFormElement\Email

Hierarchy

Expanded class hierarchy of YamlFormElement

See also

hook_yamlform_element_info_alter()

\Drupal\yamlform\YamlFormElementInterface

\Drupal\yamlform\YamlFormElementBase

\Drupal\yamlform\YamlFormElementManager

\Drupal\yamlform\YamlFormElementManagerInterface

Plugin API

70 classes are annotated with YamlFormElement
Captcha in src/Plugin/YamlFormElement/Captcha.php
Provides a 'captcha' element.
Checkbox in src/Plugin/YamlFormElement/Checkbox.php
Provides a 'checkbox' element.
Checkboxes in src/Plugin/YamlFormElement/Checkboxes.php
Provides a 'checkboxes' element.
Color in src/Plugin/YamlFormElement/Color.php
Provides a 'color' element.
Container in src/Plugin/YamlFormElement/Container.php
Provides a 'container' element.

... See full list

File

src/Annotation/YamlFormElement.php, line 24

Namespace

Drupal\yamlform\Annotation
View source
class YamlFormElement extends Plugin {

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

  /**
   * URL to the element's API documentation.
   *
   * @var string
   */
  public $api;

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

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

  /**
   * Flag that defines hidden element.
   *
   * @var bool
   */
  public $hidden = FALSE;

  /**
   * Flag that defines multiline element.
   *
   * @var bool
   */
  public $multiline = FALSE;

  /**
   * Flag that defines multiple (value) element.
   *
   * @var bool
   */
  public $multiple = FALSE;

  /**
   * Flag that defines composite element.
   *
   * @var bool
   */
  public $composite = FALSE;

  /**
   * Flag that defines if #states wrapper should applied be to the element.
   *
   * @var bool
   */
  public $states_wrapper = FALSE;

}

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
YamlFormElement::$api public property URL to the element's API documentation.
YamlFormElement::$category public property The category in the admin UI where the form will be listed.
YamlFormElement::$composite public property Flag that defines composite element.
YamlFormElement::$hidden public property Flag that defines hidden element.
YamlFormElement::$id public property The plugin ID.
YamlFormElement::$label public property The human-readable name of the form element.
YamlFormElement::$multiline public property Flag that defines multiline element.
YamlFormElement::$multiple public property Flag that defines multiple (value) element.
YamlFormElement::$states_wrapper public property Flag that defines if #states wrapper should applied be to the element.