You are here

protected function ViewStorageController::attachLoad in Views (for Drupal 7) 8.3

Overrides Drupal\config\ConfigStorageController::attachLoad();

File

lib/Drupal/views/ViewStorageController.php, line 44
Definition of Drupal\views\ViewStorageController.

Class

ViewStorageController
Defines the storage controller class for ViewStorage entities.

Namespace

Drupal\views

Code

protected function attachLoad(&$queried_entities, $revision_id = FALSE) {
  foreach ($queried_entities as $id => $entity) {

    // Create a uuid if we don't have one.
    if (empty($entity->{$this->uuidKey})) {

      // Only get an instance of uuid once.
      if (!isset($this->uuidFactory)) {
        $this->uuidFactory = new Uuid();
      }
      $entity->{$this->uuidKey} = $this->uuidFactory
        ->generate();
    }
    $this
      ->attachDisplays($entity);
  }
  parent::attachLoad($queried_entities, $revision_id);
}