function layout_paragraphs_module_implements_alter in Layout Paragraphs 1.0.x
Same name and namespace in other branches
- 2.0.x layout_paragraphs.module \layout_paragraphs_module_implements_alter()
Implements hook_module_implements_alter().
If "content_translation", move the form_alter implementation by the layout_paragraphs at the end of the list, so that it might be called after the content_translation one. Otherwise the $form['translatable'] won't be defined in layout_paragraphs_form_field_config_edit_form_alter.
@see: https://www.hashbangcode.com/article/drupal-8-altering-hook-weights.
File
- ./
layout_paragraphs.module, line 75 - Contains layout_paragraphs.module.
Code
function layout_paragraphs_module_implements_alter(&$implementations, $hook) {
// Move our hook_entity_type_alter() implementation to the end of the list.
if ($hook == 'form_alter' && isset($implementations['layout_paragraphs']) && isset($implementations['content_translation'])) {
$hook_init = $implementations['layout_paragraphs'];
unset($implementations['layout_paragraphs']);
$implementations['layout_paragraphs'] = $hook_init;
}
}