diff --git a/core/lib/Drupal/Component/Plugin/PluginBag.php b/core/lib/Drupal/Component/Plugin/PluginBag.php
new file mode 100644
index 0000000..656c8ce
--- /dev/null
+++ b/core/lib/Drupal/Component/Plugin/PluginBag.php
@@ -0,0 +1,118 @@
+<?php
+
+/**
+ * @file
+ * Contains \Drupal\Component\Plugin\PluginBag.
+ */
+
+namespace Drupal\Component\Plugin;
+
+/**
+ * Allows lazy initialization of plugins.
+ */
+abstract class PluginBag implements \ArrayAccess, \Iterator, \Countable {
+
+  /**
+   * Stores all instantiated plugins.
+   *
+   * @var array
+   */
+  protected $pluginInstances = array();
+
+  /**
+   * Stores the IDs of all potential plugin instances.
+   *
+   * @var array
+   */
+  protected $instanceIDs = array();
+
+  /**
+   * Initializes a plugin and stores the result in $this->pluginInstances.
+   *
+   * @param string $instance_id
+   *   The ID of the plugin instance to initialize.
+   */
+  abstract protected function initializePlugin($instance_id);
+
+  /**
+   * Clears all instantiated plugins.
+   */
+  public function clear() {
+    $this->pluginInstances = array();
+  }
+
+  /**
+   * Implements \ArrayAccess::offsetExists().
+   */
+  public function offsetExists($offset) {
+    return isset($this->pluginInstances[$offset]) || isset($this->instanceIDs[$offset]);
+  }
+
+  /**
+   * Implements \ArrayAccess::offsetGet().
+   */
+  public function offsetGet($offset) {
+    if (!isset($this->pluginInstances[$offset])) {
+      $this->initializePlugin($offset);
+    }
+    return $this->pluginInstances[$offset];
+  }
+
+  /**
+   * Implements \ArrayAccess::offsetSet().
+   */
+  public function offsetSet($offset, $value) {
+    $this->pluginInstances[$offset] = $value;
+  }
+
+  /**
+   * Implements \ArrayAccess::offsetUnset().
+   */
+  public function offsetUnset($offset) {
+    unset($this->pluginInstances[$offset]);
+  }
+
+  /**
+   * Implements \Iterator::current().
+   */
+  public function current() {
+    return $this->offsetGet($this->key());
+  }
+
+  /**
+   * Implements \Iterator::next().
+   */
+  public function next() {
+    next($this->instanceIDs);
+  }
+
+  /**
+   * Implements \Iterator::key().
+   */
+  public function key() {
+    return key($this->instanceIDs);
+  }
+
+  /**
+   * Implements \Iterator::valid().
+   */
+  public function valid() {
+    $key = key($this->instanceIDs);
+    return $key !== NULL && $key !== FALSE;
+  }
+
+  /**
+   * Implements \Iterator::rewind().
+   */
+  public function rewind() {
+    reset($this->instanceIDs);
+  }
+
+  /**
+   * Implements \Countable::count().
+   */
+  public function count() {
+    return count($this->instanceIDs);
+  }
+
+}
diff --git a/core/modules/views/lib/Drupal/views/DisplayArray.php b/core/modules/views/lib/Drupal/views/DisplayArray.php
index 35be37e..ad6daec 100644
--- a/core/modules/views/lib/Drupal/views/DisplayArray.php
+++ b/core/modules/views/lib/Drupal/views/DisplayArray.php
@@ -7,10 +7,12 @@
 
 namespace Drupal\views;
 
+use Drupal\Component\Plugin\PluginBag;
+
 /**
  * A class which wraps the displays of a view so you can lazy-initialize them.
  */
-class DisplayArray implements \ArrayAccess, \Iterator, \Countable {
+class DisplayArray extends PluginBag {
 
   /**
    * Stores a reference to the view which has this displays attached.
@@ -20,20 +22,6 @@ class DisplayArray implements \ArrayAccess, \Iterator, \Countable {
   protected $view;
 
   /**
-   * Stores the actual display instances in an array.
-   *
-   * @var array
-   */
-  protected $displayHandlers = array();
-
-  /**
-   * Stores all display IDs, coming from $this->view->storage->get('display').
-   *
-   * @var array
-   */
-  protected $displayIDs;
-
-  /**
    * Constructs a DisplayArray object.
    *
    * @param \Drupal\views\ViewExecutable
@@ -42,124 +30,55 @@ class DisplayArray implements \ArrayAccess, \Iterator, \Countable {
   public function __construct(ViewExecutable $view) {
     $this->view = $view;
 
-    $this->initializeDisplay('default');
+    $this->initializePlugin('default');
 
     // Store all display IDs to access them easy and fast.
     $display = $this->view->storage->get('display');
-    $this->displayIDs = drupal_map_assoc(array_keys($display));
+    $this->instanceIDs = drupal_map_assoc(array_keys($display));
   }
 
   /**
    * Destructs a DisplayArray object.
    */
   public function __destruct() {
-    foreach ($this->displayHandlers as $display_id => $display) {
+    $this->clear();
+  }
+
+  /**
+   * Overrides \Drupal\Component\Plugin\PluginBag::clear().
+   */
+  public function clear() {
+    foreach ($this->pluginInstances as $display_id => $display) {
       $display->destroy();
-      unset($this->displayHandlers[$display_id]);
     }
+
+    parent::clear();
   }
 
   /**
-   * Initializes a single display and stores the result in $this->displayHandlers.
-   *
-   * @param string $display_id
-   *   The name of the display to initialize.
+   * Overrides \Drupal\Component\Plugin\PluginBag::initializePlugin().
    */
-  protected function initializeDisplay($display_id) {
+  protected function initializePlugin($display_id) {
     // If the display was initialized before, just return.
-    if (isset($this->displayHandlers[$display_id])) {
+    if (isset($this->pluginInstances[$display_id])) {
       return;
     }
 
     // Retrieve and initialize the new display handler with data.
     $display = &$this->view->storage->getDisplay($display_id);
-    $this->displayHandlers[$display_id] = drupal_container()->get("plugin.manager.views.display")->createInstance($display['display_plugin']);
-    if (empty($this->displayHandlers[$display_id])) {
+    $this->pluginInstances[$display_id] = drupal_container()->get("plugin.manager.views.display")->createInstance($display['display_plugin']);
+    if (empty($this->pluginInstances[$display_id])) {
       // Provide a 'default' handler as an emergency. This won't work well but
       // it will keep things from crashing.
-      $this->displayHandlers[$display_id] = drupal_container()->get("plugin.manager.views.display")->createInstance('default');
+      $this->pluginInstances[$display_id] = drupal_container()->get("plugin.manager.views.display")->createInstance('default');
     }
 
-    $this->displayHandlers[$display_id]->init($this->view, $display);
+    $this->pluginInstances[$display_id]->init($this->view, $display);
     // If this is not the default display handler, let it know which is since
     // it may well utilize some data from the default.
     if ($display_id != 'default') {
-      $this->displayHandlers[$display_id]->default_display = $this->displayHandlers['default'];
-    }
-  }
-
-  /**
-   * Implements \ArrayAccess::offsetExists().
-   */
-  public function offsetExists($offset) {
-    return isset($this->displayHandlers[$offset]) || isset($this->displayIDs[$offset]);
-  }
-
-  /**
-   * Implements \ArrayAccess::offsetGet().
-   */
-  public function offsetGet($offset) {
-    if (!isset($this->displayHandlers[$offset])) {
-      $this->initializeDisplay($offset);
+      $this->pluginInstances[$display_id]->default_display = $this->pluginInstances['default'];
     }
-    return $this->displayHandlers[$offset];
-  }
-
-  /**
-   * Implements \ArrayAccess::offsetSet().
-   */
-  public function offsetSet($offset, $value) {
-    $this->displayHandlers[$offset] = $value;
-  }
-
-  /**
-   * Implements \ArrayAccess::offsetUnset().
-   */
-  public function offsetUnset($offset) {
-    unset($this->displayHandlers[$offset]);
-  }
-
-  /**
-   * Implements \Iterator::current().
-   */
-  public function current() {
-    return $this->offsetGet($this->key());
-  }
-
-  /**
-   * Implements \Iterator::next().
-   */
-  public function next() {
-    next($this->displayIDs);
-  }
-
-  /**
-   * Implements \Iterator::key().
-   */
-  public function key() {
-    return key($this->displayIDs);
-  }
-
-  /**
-   * Implements \Iterator::valid().
-   */
-  public function valid() {
-    $key = key($this->displayIDs);
-    return $key !== NULL && $key !== FALSE;
-  }
-
-  /**
-   * Implements \Iterator::rewind().
-   */
-  public function rewind() {
-    reset($this->displayIDs);
-  }
-
-  /**
-   * Implements \Countable::count().
-   */
-  public function count() {
-    return count($this->displayIDs);
   }
 
 }
