You are here

public function WebformOptionsCustom::setOptions in Webform 8.5

Same name in this branch
  1. 8.5 modules/webform_options_custom/src/Element/WebformOptionsCustom.php \Drupal\webform_options_custom\Element\WebformOptionsCustom::setOptions()
  2. 8.5 modules/webform_options_custom/src/Entity/WebformOptionsCustom.php \Drupal\webform_options_custom\Entity\WebformOptionsCustom::setOptions()
  3. 8.5 modules/webform_options_custom/src/Plugin/WebformElement/WebformOptionsCustom.php \Drupal\webform_options_custom\Plugin\WebformElement\WebformOptionsCustom::setOptions()
Same name and namespace in other branches
  1. 6.x modules/webform_options_custom/src/Entity/WebformOptionsCustom.php \Drupal\webform_options_custom\Entity\WebformOptionsCustom::setOptions()

Set options (YAML) value.

Parameters

array $options: An renderable array of options.

Return value

$this

Overrides WebformOptionsCustomInterface::setOptions

File

modules/webform_options_custom/src/Entity/WebformOptionsCustom.php, line 252

Class

WebformOptionsCustom
Defines the webform options custom entity.

Namespace

Drupal\webform_options_custom\Entity

Code

public function setOptions(array $options) {
  $this->options = Yaml::encode($options);
  $this->optionsDecoded = NULL;
}