Commit 19a379f4 authored by Julian Pustkuchen's avatar Julian Pustkuchen
Browse files

Issue #3274593 by Anybody: Paragraphs settings styling library isnt attached...

Issue #3274593 by Anybody: Paragraphs settings styling library isnt attached if creating a new custom advanced block (with paragraphs)
parent abaad858
Loading
Loading
Loading
Loading
+4 −13
Original line number Diff line number Diff line
<?php

/**
 * @file
 * @file DROWL Paragraphs enhancements.
 */

use Drupal\Component\Serialization\Json;
use Drupal\paragraphs\Entity\Paragraph;
/**
 * @file
 * DROWL paragraphs enhancements.
 */

use Drupal\Core\Template\Attribute;
use Drupal\Core\Entity\EntityInterface;
use Drupal\paragraphs\Entity\ParagraphsType;
@@ -19,15 +14,11 @@ use Drupal\Component\Utility\Html;
use Drupal\Core\Form\FormStateInterface;

/**
 * Implements hook_layout_paragraph_element_form_alter().
 *
 * @param array $element_form
 * @param \Drupal\Core\Form\FormStateInterface $element_form_state
 * @param array $parent_form
 * Implements hook_form_layout_paragraphs_component_form_alter().
 */
function drowl_paragraphs_layout_paragraph_element_form_alter(array &$element_form, FormStateInterface &$element_form_state, array $parent_form) {
function drowl_paragraphs_form_layout_paragraphs_component_form_alter(array &$form, FormStateInterface &$form_state){
  // Add backend library form to layout_paragraphs form:
  $element_form['#attached']['library'][] = 'drowl_paragraphs/admin';
    $form['#attached']['library'][] = 'drowl_paragraphs/admin';
}

/**