Upgraded imagemagick and manually altered pdf to image module to handle changes....
[yaffs-website] / web / modules / contrib / paragraphs / src / Element / ParagraphOperations.php
1 <?php
2
3 namespace Drupal\paragraphs\Element;
4
5 use Drupal\Core\Render\Element\Operations;
6 use Drupal\Core\Render\Element\RenderElement;
7
8 /**
9  * {@inheritdoc}
10  *
11  * @RenderElement("paragraph_operations")
12  */
13 class ParagraphOperations extends Operations {
14
15   /**
16    * {@inheritdoc}
17    */
18   public function getInfo() {
19     return ['#theme' => 'links__dropbutton__operations__paragraphs'] + parent::getInfo();
20   }
21
22   /**
23    * {@inheritdoc}
24    */
25   public static function preRenderDropbutton($element) {
26     $element = parent::preRenderDropbutton($element);
27
28     // Attach #ajax events if title is a render array.
29     foreach ($element['#links'] as &$link) {
30       if (isset($link['title']['#ajax'])) {
31         $link['title'] = RenderElement::preRenderAjaxForm($link['title']);
32       }
33     }
34
35     return $element;
36   }
37
38 }