Problem/Motivation
If we have a view with multiple displays for example:
Display 1
Display 2
Feed 1 (attached to display 1)
Feed 2 (attached to display 2)
The method getAttachedDisplays() when called on the display handler for Display 1 will return [Feed 1, Feed 2] instead of the expected [Feed 1].
Proposed resolution
// Go through all displays and search displays which link to this one.
foreach ($this->view->storage->get('display') as $display_id => $display) {
if (isset($display['display_options']['displays'])) {
$displays = $display['display_options']['displays'];
if (isset($displays[$current_display_id])) {
$attached_displays[] = $display_id;
}
}
}
if (isset($displays[$current_display_id])) needs an extra check for !empty($displays[$current_display_id]) because for the feed displays, the value $displays[$current_display_id] is set but is 0 if the feed is not attached.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3458785
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
minirobot commented