Loading drowl_paragraphs.module +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; Loading @@ -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'; } /** Loading Loading
drowl_paragraphs.module +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; Loading @@ -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'; } /** Loading