Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / themes / contrib / bootstrap / src / Plugin / Process / ActionsDropbutton.php
index d974da2b078a2dffc6b17076cfba2410c480c32d..b825076e2a686d2444f8627f61ec591d8b4cc74e 100644 (file)
@@ -1,12 +1,7 @@
 <?php
-/**
- * @file
- * Contains \Drupal\bootstrap\Plugin\Process\ActionsDropbutton.
- */
 
 namespace Drupal\bootstrap\Plugin\Process;
 
-use Drupal\bootstrap\Annotation\BootstrapProcess;
 use Drupal\bootstrap\Utility\Element;
 use Drupal\Core\Form\FormStateInterface;
 
@@ -21,7 +16,9 @@ use Drupal\Core\Form\FormStateInterface;
  *
  * @see \Drupal\Core\Render\Element\Actions::preRenderActionsDropbutton()
  *
- * @todo This may become a #pre_render callback.
+ * @see https://www.drupal.org/node/2855458
+ *
+ * @todo Remove once core is fixed.
  */
 class ActionsDropbutton extends ProcessBase implements ProcessInterface {
 
@@ -37,7 +34,7 @@ class ActionsDropbutton extends ProcessBase implements ProcessInterface {
           $dropbuttons->$dropbutton = ['#type' => 'dropbutton'];
         }
 
-        $dropbuttons[$dropbutton]['#links'][$key] = $child->getArray();
+        $dropbuttons[$dropbutton]['#links'][$key] = ['title' => $child->getArray()];
 
         // Remove original child from the element so it's not rendered twice.
         $child->setProperty('printed', TRUE);