Skip to content
Snippets Groups Projects
Commit e8f09383 authored by Julian Pustkuchen's avatar Julian Pustkuchen
Browse files

Use drowl_paragraphs_preprocess_layout_paragraphs_builder instead of...

Use drowl_paragraphs_preprocess_layout_paragraphs_builder instead of drowl_paragraphs_form_layout_paragraphs_component_form_alter.
parent a5af72e0
No related branches found
No related tags found
No related merge requests found
......@@ -11,14 +11,13 @@ use Drupal\Core\Entity\EntityInterface;
use Drupal\paragraphs\Entity\ParagraphsType;
use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
use Drupal\Component\Utility\Html;
use Drupal\Core\Form\FormStateInterface;
/**
* Implements hook_form_layout_paragraphs_component_form_alter().
* Implements hook_preprocess_layout_paragraphs_builder().
*/
function drowl_paragraphs_form_layout_paragraphs_component_form_alter(array &$form, FormStateInterface &$form_state){
// Add backend library form to layout_paragraphs form:
$form['#attached']['library'][] = 'drowl_paragraphs/admin';
function drowl_paragraphs_preprocess_layout_paragraphs_builder(array &$variables) {
// Add backend library form to layout_paragraphs builder form.
$variables['#attached']['library'][] = 'drowl_paragraphs/admin';
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment