Commit 32e23b57 authored by Dries's avatar Dries

Issue #1888942 by dawehner: Rename viewStorageController::attachDisplays().

parent ee1b6de6
......@@ -35,7 +35,7 @@ public function load(array $ids = NULL) {
*/
protected function attachLoad(&$queried_entities, $revision_id = FALSE) {
foreach ($queried_entities as $id => $entity) {
$this->attachDisplays($entity);
$this->mergeDefaultDisplaysOptions($entity);
}
parent::attachLoad($queried_entities, $revision_id);
......@@ -70,16 +70,17 @@ public function create(array $values) {
$entity = parent::create($values);
$this->attachDisplays($entity);
$this->mergeDefaultDisplaysOptions($entity);
return $entity;
}
/**
* Add defaults to the display options.
*
* @param Drupal\Core\Entity\EntityInterface $entity
* @param \Drupal\Core\Entity\EntityInterface $entity
* The view entity to attach default displays options.
*/
protected function attachDisplays(EntityInterface $entity) {
protected function mergeDefaultDisplaysOptions(EntityInterface $entity) {
if (isset($entity->display) && is_array($entity->display)) {
$displays = array();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment