diff -u b/lib/Drupal/views/DisplayArray.php b/lib/Drupal/views/DisplayArray.php --- b/lib/Drupal/views/DisplayArray.php +++ b/lib/Drupal/views/DisplayArray.php @@ -24,7 +24,7 @@ * * @var array */ - protected $display = array(); + protected $displayHandlers = array(); /** * Constructs a DisplayArray object. @@ -42,31 +42,31 @@ * Destructs a DisplayArray object. */ public function __destruct() { - foreach ($this->display as $display_id => $display) { + foreach ($this->$displayHandlers as $display_id => $display) { $display->destroy(); - unset($this->display[$display_id]); + unset($this->displayHandlers[$display_id]); } } /** - * Initializes a single display and stores the result in self::display. + * Initializes a single display and stores the result in $this->displayHandlers. * * @param string $display_id * The name of the display to initialize. */ protected function initializeDisplay($display_id) { // If the display was initialize before just return. - if (isset($this->display[$display_id])) { + if (isset($this->displayHandlers[$display_id])) { return; } // Retrieve and initialize the new display handler with data. - $this->display[$display_id] = views_get_plugin('display', $this->view->storage->display[$display_id]['display_plugin']); - $this->display[$display_id]->init($this->view, $this->view->storage->display[$display_id]); + $this->displayHandlers[$display_id] = views_get_plugin('display', $this->view->storage->display[$display_id]['display_plugin']); + $this->displayHandlers[$display_id]->init($this->view, $this->view->storage->display[$display_id]); // 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->display[$display_id]->default_display = $this->display['default']; + $this->displayHandlers[$display_id]->default_display = $this->displayHandlers['default']; } } @@ -83,31 +83,31 @@ * Implements \ArrayAccess::offsetExists(). */ public function offsetExists($offset) { - return isset($this->display[$offset]) || isset($this->view->storage->display[$offset]); + return isset($this->displayHandlers[$offset]) || isset($this->view->storage->display[$offset]); } /** * Implements \ArrayAccess::offsetGet(). */ public function offsetGet($offset) { - if (!isset($this->display[$offset])) { + if (!isset($this->displayHandlers[$offset])) { $this->initializeDisplay($offset); } - return $this->display[$offset]; + return $this->displayHandlers[$offset]; } /** * Implements \ArrayAccess::offsetSet(). */ public function offsetSet($offset, $value) { - $this->display[$offset] = $value; + $this->displayHandlers[$offset] = $value; } /** * Implements \ArrayAccess::offsetUnset(). */ public function offsetUnset($offset) { - unset($this->display[$offset]); + unset($this->displayHandlers[$offset]); } /** @@ -118,7 +118,7 @@ } /** - * Implements \Iterator::current(). + * Implements \Iterator::next(). */ public function next() { // If we do an actual iteration over the elements, let's initialize all @@ -139,7 +139,7 @@ */ public function valid() { $display_id = key($this->display); - return isset($this->display[$display_id]); + return isset($this->displayHandlers[$display_id]); } /**