public function Webform::setElements in Webform 8.5
Same name and namespace in other branches
- 6.x src/Entity/Webform.php \Drupal\webform\Entity\Webform::setElements()
Sets elements (YAML) value.
Parameters
array $elements: An renderable array of elements.
Return value
$this
Overrides WebformInterface::setElements
3 calls to Webform::setElements()
- Webform::deleteElement in src/
Entity/ Webform.php - Remove an element.
- Webform::initElementsTranslation in src/
Entity/ Webform.php - Initialize elements translation.
- Webform::setElementProperties in src/
Entity/ Webform.php - Set element properties.
File
- src/
Entity/ Webform.php, line 1440
Class
- Webform
- Defines the webform entity.
Namespace
Drupal\webform\EntityCode
public function setElements(array $elements) {
$this->elements = WebformYaml::encode($elements);
$this
->resetElements();
return $this;
}