function gutenberg_form_node_form_details_after_build in Gutenberg 8.2
Same name and namespace in other branches
- 8 gutenberg.module \gutenberg_form_node_form_details_after_build()
Called by form after build.
1 string reference to 'gutenberg_form_node_form_details_after_build'
- gutenberg_form_node_form_alter in ./
gutenberg.module - Implements hook_form_BASE_FORM_ID_alter() for \Drupal\node\NodeForm.
File
- ./
gutenberg.module, line 591 - Provides integration with the Gutenberg editor.
Code
function gutenberg_form_node_form_details_after_build(array $element, FormStateInterface $form_state) {
// gutenberg_handle_messages($element);
foreach ($element['#fields_with_details'] as $value) {
$element['#attached']['drupalSettings']['gutenberg']['metaboxes'][] = $element[$value]['widget'][0]['#id'];
}
return $element;
}