You are here

public function SubformStateInterface::addElementState in Markdown 8.2

Adds a #states selector to an element.

Parameters

array $element: An element to add the state to, passed by reference.

string $state: The state that will be triggered.

string $name: The name of the element used for conditions.

array $conditions: The conditions of $name that trigger $state.

array $parents: Optional. A specific array of parents. If not provided, the parents are determined automatically by the subform state.

1 method overrides SubformStateInterface::addElementState()
SubformState::addElementState in src/Form/SubformState.php
Adds a #states selector to an element.

File

src/Form/SubformStateInterface.php, line 27

Class

SubformStateInterface
Interface for markdown plugin subforms.

Namespace

Drupal\markdown\Form

Code

public function addElementState(array &$element, $state, $name, array $conditions, array $parents = NULL);