public static function ContentEmbedBlock::updateCallback in Content Browser 8
AJAX callback: Re-renders the Entity Browser button/table.
File
- src/
Plugin/ Block/ ContentEmbedBlock.php, line 173
Class
- ContentEmbedBlock
- Provides the "Content Embed" block.
Namespace
Drupal\content_browser\Plugin\BlockCode
public static function updateCallback(array &$form, FormStateInterface $form_state) {
$trigger = $form_state
->getTriggeringElement();
$parents = array_slice($trigger['#array_parents'], 0, -2);
$selection = NestedArray::getValue($form, $parents);
return $selection;
}