public static function ParagraphOperations::preRenderDropbutton

File

paragraphs/src/Element/ParagraphOperations.php, line 25

Class

ParagraphOperations
Plugin annotation @RenderElement("paragraph_operations");

Namespace

Drupal\paragraphs\Element

Code

public static function preRenderDropbutton($element) {
  $element = parent::preRenderDropbutton($element);

  // Attach #ajax events if title is a render array.
  foreach ($element['#links'] as &$link) {
    if (isset($link['title']['#ajax'])) {
      $link['title'] = RenderElement::preRenderAjaxForm($link['title']);
    }
  }
  return $element;
}