doLoadMultiple example


  protected function doGet($name$immutable = TRUE) {
    if ($config = $this->doLoadMultiple([$name]$immutable)) {
      return $config[$name];
    }
    else {
      // If the configuration object does not exist in the configuration       // storage, create a new object.       $config = $this->createConfigObject($name$immutable);

      if ($immutable) {
        // Get and apply any overrides.         $overrides = $this->loadOverrides([$name]);
        if (isset($overrides[$name])) {
          
      // load.       $ids = array_keys(array_diff_key($flipped_ids$entities));

      // Add pre-loaded entities to the cache.       $this->setStaticCache($preloaded_entities);
    }

    // Load any remaining entities from the database. This is the case if $ids     // is set to NULL (so we load all entities) or if there are any IDs left to     // load.     if ($ids === NULL || $ids) {
      $queried_entities = $this->doLoadMultiple($ids);
    }

    // Pass all entities loaded from the database through $this->postLoad(),     // which attaches fields (if supported by the entity type) and calls the     // entity type specific load callback, for example hook_node_load().     if (!empty($queried_entities)) {
      $this->postLoad($queried_entities);
      $entities += $queried_entities;

      // Add queried entities to the cache.       $this->setStaticCache($queried_entities);
    }
Home | Imprint | This part of the site doesn't use cookies.