Skip to content
Snippets Groups Projects
Commit 32e23b57 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

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

parent ee1b6de6
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment