public static function ComponentBlock::updateElementValue in Component blocks 1.0.x
Same name and namespace in other branches
- 1.x src/Plugin/Block/ComponentBlock.php \Drupal\component_blocks\Plugin\Block\ComponentBlock::updateElementValue()
- 1.1.x src/Plugin/Block/ComponentBlock.php \Drupal\component_blocks\Plugin\Block\ComponentBlock::updateElementValue()
Ajax callback that updates options.
File
- src/
Plugin/ Block/ ComponentBlock.php, line 383
Class
- ComponentBlock
- Defines a class for a specially shaped block.
Namespace
Drupal\component_blocks\Plugin\BlockCode
public static function updateElementValue(array $form, FormStateInterface $form_state) {
$array_parents = $form_state
->getTriggeringElement()['#array_parents'];
array_pop($array_parents);
return NestedArray::getValue($form, $array_parents);
}