From 7835ea91c7003d490dabadff84c0922026c26d68 Mon Sep 17 00:00:00 2001
From: Claudiu Cristea <clau.cristea@gmail.com>
Date: Wed, 26 Jun 2013 21:14:34 +0300
Subject: [PATCH] Issue #2024833 by claudiu.cristea | Crell: Adopt load() and
 loadMultiple() on entity storage controllers.

---
 core/includes/bootstrap.inc                        |    6 ++---
 core/includes/entity.inc                           |   14 +++++++-----
 core/includes/menu.inc                             |    2 +-
 .../Core/Config/Entity/ConfigStorageController.php |   23 ++++++++++++--------
 .../Core/Entity/DatabaseStorageController.php      |   14 +++++++++---
 .../Drupal/Core/Entity/EntityListController.php    |    2 +-
 .../Core/Entity/EntityStorageControllerBase.php    |    3 +--
 .../Entity/EntityStorageControllerInterface.php    |   13 ++++++++++-
 .../Drupal/Core/ParamConverter/EntityConverter.php |    5 +----
 .../lib/Drupal/action/ActionFormControllerBase.php |    4 ++--
 .../aggregator/Controller/AggregatorController.php |    2 +-
 .../lib/Drupal/aggregator/Form/OpmlFeedAdd.php     |    2 +-
 .../aggregator/Plugin/views/argument/Fid.php       |    2 +-
 .../aggregator/Plugin/views/argument/Iid.php       |    2 +-
 .../modules/block/custom_block/custom_block.module |    8 +++----
 .../Controller/CustomBlockController.php           |    2 +-
 .../lib/Drupal/block/BlockStorageController.php    |    4 ++--
 .../Drupal/block/Tests/BlockStorageUnitTest.php    |   10 ++++-----
 .../Drupal/block/Tests/Views/DisplayBlockTest.php  |   20 ++++++++---------
 core/modules/book/lib/Drupal/book/BookManager.php  |    2 +-
 core/modules/breakpoint/breakpoint.module          |    6 ++---
 core/modules/comment/comment.module                |    2 +-
 core/modules/contact/contact.module                |    4 ++--
 core/modules/editor/editor.module                  |   10 ++++-----
 .../EntityReferenceAutocomplete.php                |    3 +--
 .../field/FieldInstanceStorageController.php       |    5 +++--
 .../lib/Drupal/field/FieldStorageController.php    |    4 ++--
 .../lib/Drupal/field/Plugin/Core/Entity/Field.php  |    4 ++--
 .../field/Plugin/Core/Entity/FieldInstance.php     |    2 +-
 core/modules/file/file.module                      |    5 ++---
 core/modules/filter/filter.module                  |    4 ++--
 .../Drupal/filter/FilterFormatListController.php   |    2 +-
 .../lib/Drupal/forum/ForumBreadcrumbBuilder.php    |    6 ++---
 core/modules/image/image.module                    |    6 ++---
 .../Controller/LayoutTestController.php            |    3 +--
 .../menu/lib/Drupal/menu/Form/MenuDeleteForm.php   |    2 +-
 core/modules/menu/menu.module                      |    2 +-
 .../Drupal/menu_link/MenuLinkStorageController.php |    5 ++---
 .../menu_link/Plugin/Core/Entity/MenuLink.php      |    3 +--
 core/modules/menu_link/menu_link.module            |    8 +++----
 core/modules/node/node.module                      |   12 +++++-----
 core/modules/picture/picture.module                |    2 +-
 core/modules/shortcut/shortcut.module              |    2 +-
 .../system/Plugin/views/field/BulkFormBase.php     |    2 +-
 .../Drupal/system/Tests/Action/ActionUnitTest.php  |    4 ++--
 .../system/Tests/Upgrade/SystemUpgradePathTest.php |    3 +--
 core/modules/system/system.api.php                 |    4 ++--
 .../tests/modules/entity_test/entity_test.module   |    6 ++---
 .../tests/modules/menu_test/menu_test.module       |    8 +++----
 core/modules/taxonomy/taxonomy.module              |   10 ++++-----
 .../user/lib/Drupal/user/Form/UserLoginForm.php    |    3 +--
 .../lib/Drupal/user/Plugin/Core/Entity/Role.php    |    2 +-
 .../Drupal/user/Plugin/views/argument/RolesRid.php |    2 +-
 .../Drupal/user/Plugin/views/field/Permissions.php |    2 +-
 core/modules/user/user.module                      |    8 +++----
 .../lib/Drupal/views/Plugin/Block/ViewsBlock.php   |    2 +-
 .../Drupal/views/Routing/ViewPageController.php    |    3 +--
 .../lib/Drupal/views/Tests/DefaultViewsTest.php    |    2 +-
 .../views/lib/Drupal/views/Tests/ModuleTest.php    |    5 ++---
 .../Drupal/views/Tests/Plugin/DisplayFeedTest.php  |    3 +--
 .../lib/Drupal/views/ViewStorageController.php     |    6 ++---
 core/modules/views/views.module                    |    4 ++--
 .../views_ui/Controller/ViewsUIController.php      |    4 ++--
 .../lib/Drupal/views_ui/Form/BreakLockForm.php     |    4 ++--
 .../lib/Drupal/views_ui/Tests/GroupByTest.php      |    3 +--
 .../lib/Drupal/views_ui/Tests/HandlerTest.php      |    9 +++-----
 66 files changed, 173 insertions(+), 168 deletions(-)

diff --git a/core/includes/bootstrap.inc b/core/includes/bootstrap.inc
index cf0e3dd..3230171 100644
--- a/core/includes/bootstrap.inc
+++ b/core/includes/bootstrap.inc
@@ -2554,12 +2554,12 @@ function language_default_locked_languages($weight = 0) {
  * @param string $langcode
  *   The language code.
  *
- * @return Drupal\core\Language\Language | FALSE
- *   A fully-populated language object or FALSE.
+ * @return Drupal\core\Language\Language|null
+ *   A fully-populated language object or NULL.
  */
 function language_load($langcode) {
   $languages = language_list(Language::STATE_ALL);
-  return isset($languages[$langcode]) ? $languages[$langcode] : FALSE;
+  return isset($languages[$langcode]) ? $languages[$langcode] : NULL;
 }
 
 /**
diff --git a/core/includes/entity.inc b/core/includes/entity.inc
index 743cc4a..e6787cd 100644
--- a/core/includes/entity.inc
+++ b/core/includes/entity.inc
@@ -157,14 +157,16 @@ function entity_get_view_modes($entity_type = NULL) {
  *   The entity object, or FALSE if there is no entity with the given id.
  *
  * @see \Drupal\Core\Entity\EntityManager
- * @see entity_load_multiple()
  * @see Drupal\Core\Entity\EntityStorageControllerInterface
  * @see Drupal\Core\Entity\DatabaseStorageController
  * @see Drupal\Core\Entity\Query\QueryInterface
  */
 function entity_load($entity_type, $id, $reset = FALSE) {
-  $entities = entity_load_multiple($entity_type, array($id), $reset);
-  return isset($entities[$id]) ? $entities[$id] : FALSE;
+  $controller = Drupal::entityManager()->getStorageController($entity_type);
+  if ($reset) {
+    $controller->resetCache(array($id));
+  }
+  return $controller->load($id);
 }
 
 /**
@@ -274,9 +276,9 @@ function entity_load_by_uuid($entity_type, $uuid, $reset = FALSE) {
 function entity_load_multiple($entity_type, array $ids = NULL, $reset = FALSE) {
   $controller = Drupal::entityManager()->getStorageController($entity_type);
   if ($reset) {
-    $controller->resetCache();
+    $controller->resetCache($ids);
   }
-  return $controller->load($ids);
+  return $controller->loadMultiple($ids);
 }
 
 /**
@@ -329,7 +331,7 @@ function entity_load_unchanged($entity_type, $id) {
  */
 function entity_delete_multiple($entity_type, array $ids) {
   $controller = Drupal::entityManager()->getStorageController($entity_type);
-  $entities = $controller->load($ids);
+  $entities = $controller->loadMultiple($ids);
   $controller->delete($entities);
 }
 
diff --git a/core/includes/menu.inc b/core/includes/menu.inc
index 66d1e2a..1d805d4 100644
--- a/core/includes/menu.inc
+++ b/core/includes/menu.inc
@@ -559,7 +559,7 @@ function _menu_load_objects(&$item, &$map) {
           $return = $function($value);
         }
         // If callback returned an error or there is no callback, trigger 404.
-        if ($return === FALSE) {
+        if (empty($return)) {
           $item['access'] = FALSE;
           $map = FALSE;
           return FALSE;
diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
index b86e1f0..ee62eb3 100644
--- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
+++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php
@@ -114,9 +114,9 @@ public static function createInstance(ContainerInterface $container, $entity_typ
   }
 
   /**
-   * Implements Drupal\Core\Entity\EntityStorageControllerInterface::load().
+   * Implements Drupal\Core\Entity\EntityStorageControllerInterface::loadMultiple().
    */
-  public function load(array $ids = NULL) {
+  public function loadMultiple(array $ids = NULL) {
     $entities = array();
 
     // Create a new variable which is either a prepared version of the $ids
@@ -153,6 +153,14 @@ public function load(array $ids = NULL) {
   }
 
   /**
+   * {@inheritdoc}
+   */
+  public function load($id) {
+    $entities = $this->loadMultiple(array($id));
+    return isset($entities[$id]) ? $entities[$id] : NULL;
+  }
+
+  /**
    * Implements Drupal\Core\Entity\EntityStorageControllerInterface::loadRevision().
    */
   public function loadRevision($revision_id) {
@@ -170,7 +178,7 @@ public function deleteRevision($revision_id) {
    * Implements Drupal\Core\Entity\EntityStorageControllerInterface::loadByProperties().
    */
   public function loadByProperties(array $values = array()) {
-    $entities = $this->load();
+    $entities = $this->loadMultiple();
     foreach ($values as $key => $value) {
       $entities = array_filter($entities, function($entity) use ($key, $value) {
         return $value === $entity->get($key);
@@ -386,8 +394,7 @@ public function save(EntityInterface $entity) {
 
     if (!$is_new && !isset($entity->original)) {
       $this->resetCache(array($id));
-      $result = $this->load(array($id));
-      $entity->original = reset($result);
+      $entity->original = $this->load($id);
     }
 
     if ($id !== $entity->id()) {
@@ -492,8 +499,7 @@ public function importCreate($name, Config $new_config, Config $old_config) {
    */
   public function importUpdate($name, Config $new_config, Config $old_config) {
     $id = static::getIDFromConfigName($name, $this->entityInfo['config_prefix']);
-    $entities = $this->load(array($id));
-    $entity = $entities[$id];
+    $entity = $this->load($id);
     $entity->original = clone $entity;
 
     foreach ($old_config->get() as $property => $value) {
@@ -523,8 +529,7 @@ public function importUpdate($name, Config $new_config, Config $old_config) {
    */
   public function importDelete($name, Config $new_config, Config $old_config) {
     $id = static::getIDFromConfigName($name, $this->entityInfo['config_prefix']);
-    $entities = $this->load(array($id));
-    $entity = $entities[$id];
+    $entity = $this->load($id);
     $entity->delete();
     return TRUE;
   }
diff --git a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
index b647009..cdf8eb3 100644
--- a/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
+++ b/core/lib/Drupal/Core/Entity/DatabaseStorageController.php
@@ -111,9 +111,9 @@ public function __construct($entity_type, array $entity_info, Connection $databa
   }
 
   /**
-   * Implements \Drupal\Core\Entity\EntityStorageControllerInterface::load().
+   * Implements \Drupal\Core\Entity\EntityStorageControllerInterface::loadMultiple().
    */
-  public function load(array $ids = NULL) {
+  public function loadMultiple(array $ids = NULL) {
     $entities = array();
 
     // Create a new variable which is either a prepared version of the $ids
@@ -178,6 +178,14 @@ public function load(array $ids = NULL) {
   }
 
   /**
+   * {@inheritdoc}
+   */
+  public function load($id) {
+    $entities = $this->loadMultiple(array($id));
+    return isset($entities[$id]) ? $entities[$id] : NULL;
+  }
+
+  /**
    * Implements \Drupal\Core\Entity\EntityStorageControllerInterface::loadRevision().
    */
   public function loadRevision($revision_id) {
@@ -227,7 +235,7 @@ public function loadByProperties(array $values = array()) {
     $entity_query = \Drupal::entityQuery($this->entityType);
     $this->buildPropertyQuery($entity_query, $values);
     $result = $entity_query->execute();
-    return $result ? $this->load($result) : array();
+    return $result ? $this->loadMultiple($result) : array();
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/EntityListController.php b/core/lib/Drupal/Core/Entity/EntityListController.php
index 1ebab9e..88b2207 100644
--- a/core/lib/Drupal/Core/Entity/EntityListController.php
+++ b/core/lib/Drupal/Core/Entity/EntityListController.php
@@ -87,7 +87,7 @@ public function getStorageController() {
    * Implements \Drupal\Core\Entity\EntityListControllerInterface::load().
    */
   public function load() {
-    return $this->storage->load();
+    return $this->storage->loadMultiple();
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/EntityStorageControllerBase.php b/core/lib/Drupal/Core/Entity/EntityStorageControllerBase.php
index 5dbf55b..6ad0fb8 100644
--- a/core/lib/Drupal/Core/Entity/EntityStorageControllerBase.php
+++ b/core/lib/Drupal/Core/Entity/EntityStorageControllerBase.php
@@ -89,8 +89,7 @@ public function __construct($entity_type, $entity_info) {
    */
   public function loadUnchanged($id) {
     $this->resetCache(array($id));
-    $result = $this->load(array($id));
-    return reset($result);
+    return $this->load($id);
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php
index 5ae3076..24447fd 100644
--- a/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityStorageControllerInterface.php
@@ -38,7 +38,18 @@ public function resetCache(array $ids = NULL);
    * @return
    *   An array of entity objects indexed by their ids.
    */
-  public function load(array $ids = NULL);
+  public function loadMultiple(array $ids = NULL);
+
+  /**
+   * Loads one entity.
+   *
+   * @param mixed $id
+   *   The ID of the entity to load.
+   *
+   * @return \Drupal\Core\Entity\EntityInterface
+   *   An entity object.
+   */
+  public function load($id);
 
   /**
    * Loads an unchanged entity from the database.
diff --git a/core/lib/Drupal/Core/ParamConverter/EntityConverter.php b/core/lib/Drupal/Core/ParamConverter/EntityConverter.php
index f28906f..50b7d7c 100644
--- a/core/lib/Drupal/Core/ParamConverter/EntityConverter.php
+++ b/core/lib/Drupal/Core/ParamConverter/EntityConverter.php
@@ -92,10 +92,7 @@ public function process(array &$variables, Route $route, array &$converted) {
         $value = $variables[$name];
 
         $storageController = $this->entityManager->getStorageController($type);
-        $entities = $storageController->load(array($value));
-
-        // Make sure $entities is null, if upcasting fails.
-        $entity = $entities ? reset($entities) : NULL;
+        $entity = $storageController->load($value);
         $variables[$name] = $entity;
 
         // Mark this variable as converted.
diff --git a/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php b/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
index c5d58e6..93afecb 100644
--- a/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
+++ b/core/modules/action/lib/Drupal/action/ActionFormControllerBase.php
@@ -110,8 +110,8 @@ public function form(array $form, array &$form_state) {
    *   TRUE if the action exists, FALSE otherwise.
    */
   public function exists($id) {
-    $actions = $this->storageController->load(array($id));
-    return isset($actions[$id]);
+    $action = $this->storageController->load($id);
+    return !empty($action);
   }
 
   /**
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php
index eac277c..1d7204f 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Controller/AggregatorController.php
@@ -238,7 +238,7 @@ public function pageLast() {
    */
   public function sources() {
 
-    $feeds = $this->entityManager->getStorageController('aggregator_feed')->load();
+    $feeds = $this->entityManager->getStorageController('aggregator_feed')->loadMultiple();
 
     $build = array(
       '#type' => 'container',
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php b/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php
index 60ab96b..0959fb0 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Form/OpmlFeedAdd.php
@@ -202,7 +202,7 @@ public function submitForm(array &$form, array &$form_state) {
         ->execute();
       $result = $this->entityManager
         ->getStorageController('aggregator_feed')
-        ->load($ids);
+        ->loadMultiple($ids);
       foreach ($result as $old) {
         if (strcasecmp($old->label(), $feed['title']) == 0) {
           drupal_set_message(t('A feed named %title already exists.', array('%title' => $old->label())), 'warning');
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Fid.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Fid.php
index f77fb02..a9ee26c 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Fid.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Fid.php
@@ -59,7 +59,7 @@ public static function create(ContainerInterface $container, array $configuratio
   function titleQuery() {
     $titles = array();
 
-    $feeds = $this->entityManager->getStorageController('aggregator_feed')->load($this->value);
+    $feeds = $this->entityManager->getStorageController('aggregator_feed')->loadMultiple($this->value);
     foreach ($feeds as $feed) {
       $titles[] = String::checkPlain($feed->label());
     }
diff --git a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Iid.php b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Iid.php
index 1ce1864..29150c2 100644
--- a/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Iid.php
+++ b/core/modules/aggregator/lib/Drupal/aggregator/Plugin/views/argument/Iid.php
@@ -59,7 +59,7 @@ public static function create(ContainerInterface $container, array $configuratio
   function titleQuery() {
     $titles = array();
 
-    $items = $this->entityManager->getStorageController('aggregator_item')->load($this->value);
+    $items = $this->entityManager->getStorageController('aggregator_item')->loadMultiple($this->value);
     foreach ($items as $feed) {
       $titles[] = String::checkPlain($feed->label());
     }
diff --git a/core/modules/block/custom_block/custom_block.module b/core/modules/block/custom_block/custom_block.module
index 0a3efde..467c006 100644
--- a/core/modules/block/custom_block/custom_block.module
+++ b/core/modules/block/custom_block/custom_block.module
@@ -121,8 +121,8 @@ function custom_block_theme($existing, $type, $theme, $path) {
  * @param int $id
  *   The ID of the custom block type to load.
  *
- * @return Drupal\custom_block\Plugin\Core\Entity\CustomBlockType|false
- *   A CustomBlockType object or FALSE if the requested $id does not exist.
+ * @return Drupal\custom_block\Plugin\Core\Entity\CustomBlockType|null
+ *   A CustomBlockType object or NULL if the requested $id does not exist.
  */
 function custom_block_type_load($id) {
   return entity_load('custom_block_type', $id);
@@ -134,8 +134,8 @@ function custom_block_type_load($id) {
  * @param int $id
  *   The id of the custom block.
  *
- * @return Drupal\custom_block\Plugin\Core\Entity\CustomBlock|false
- *   A CustomBlock object or FALSE if the requested $id does not exist.
+ * @return Drupal\custom_block\Plugin\Core\Entity\CustomBlock|null
+ *   A CustomBlock object or NULL if the requested $id does not exist.
  */
 function custom_block_load($id) {
   return entity_load('custom_block', $id);
diff --git a/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php b/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php
index 4f139f3..a3e6aac 100644
--- a/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php
+++ b/core/modules/block/custom_block/lib/Drupal/custom_block/Controller/CustomBlockController.php
@@ -74,7 +74,7 @@ public function __construct(PluginManagerInterface $entity_manager, EntityStorag
    *   returns the custom block add page for that custom block type.
    */
   public function add() {
-    $types = $this->customBlockTypeStorage->load();
+    $types = $this->customBlockTypeStorage->loadMultiple();
     if ($types && count($types) == 1) {
       $type = reset($types);
       return $this->addForm($type);
diff --git a/core/modules/block/lib/Drupal/block/BlockStorageController.php b/core/modules/block/lib/Drupal/block/BlockStorageController.php
index 747aa87..1432712 100644
--- a/core/modules/block/lib/Drupal/block/BlockStorageController.php
+++ b/core/modules/block/lib/Drupal/block/BlockStorageController.php
@@ -18,8 +18,8 @@ class BlockStorageController extends ConfigStorageController {
   /**
    * {@inheritdoc}
    */
-  public function load(array $ids = NULL) {
-    $entities = parent::load($ids);
+  public function loadMultiple(array $ids = NULL) {
+    $entities = parent::loadMultiple($ids);
     // Only blocks with a valid plugin should be loaded.
     return array_filter($entities, function ($entity) {
       return $entity->getPlugin();
diff --git a/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php
index 5990b2f..3b96331 100644
--- a/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/BlockStorageUnitTest.php
@@ -116,8 +116,7 @@ protected function createTests() {
    * Tests the rendering of blocks.
    */
   protected function loadTests() {
-    $entities = $this->controller->load(array('stark.test_block'));
-    $entity = reset($entities);
+    $entity = $this->controller->load('stark.test_block');
 
     $this->assertTrue($entity instanceof Block, 'The loaded entity is a Block.');
 
@@ -182,8 +181,7 @@ protected function renderTests() {
    * Tests the deleting of blocks.
    */
   protected function deleteTests() {
-    $entities = $this->controller->load(array('stark.test_block'));
-    $entity = reset($entities);
+    $entity = $this->controller->load('stark.test_block');
 
     // Ensure that the storage isn't currently empty.
     $config_storage = $this->container->get('config.storage');
@@ -202,13 +200,13 @@ protected function deleteTests() {
    * Tests the installation of default blocks.
    */
   public function testDefaultBlocks() {
-    $entities = $this->controller->load();
+    $entities = $this->controller->loadMultiple();
     $this->assertTrue(empty($entities), 'There are no blocks initially.');
 
     // Install the block_test.module, so that its default config is installed.
     $this->installConfig(array('block_test'));
 
-    $entities = $this->controller->load();
+    $entities = $this->controller->loadMultiple();
     $entity = reset($entities);
     $this->assertEqual($entity->id(), 'stark.test_block', 'The default test block was loaded.');
   }
diff --git a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
index aba702f..ec3d500 100644
--- a/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
+++ b/core/modules/block/lib/Drupal/block/Tests/Views/DisplayBlockTest.php
@@ -75,10 +75,10 @@ protected function testDeleteBlockDisplay() {
     $view->displayHandlers->remove('block_1');
     $view->storage->save();
 
-    $this->assertFalse($block_storage_controller->load(array($block_1->id())), 'The block for this display was removed.');
-    $this->assertFalse($block_storage_controller->load(array($block_2->id())), 'The block for this display was removed.');
-    $this->assertTrue($block_storage_controller->load(array($block_3->id())), 'A block from another view was unaffected.');
-    $this->assertTrue($block_storage_controller->load(array($block_4->id())), 'A block from another view was unaffected.');
+    $this->assertFalse($block_storage_controller->load($block_1->id()), 'The block for this display was removed.');
+    $this->assertFalse($block_storage_controller->load($block_2->id()), 'The block for this display was removed.');
+    $this->assertTrue($block_storage_controller->load($block_3->id()), 'A block from another view was unaffected.');
+    $this->assertTrue($block_storage_controller->load($block_4->id()), 'A block from another view was unaffected.');
     $this->drupalGet('test-page');
     $this->assertNoBlockAppears($block_1);
     $this->assertNoBlockAppears($block_2);
@@ -92,8 +92,8 @@ protected function testDeleteBlockDisplay() {
     $view->displayHandlers->remove('block_1');
     $view->storage->save();
 
-    $this->assertFalse($block_storage_controller->load(array($block_3->id())), 'The block for this display was removed.');
-    $this->assertTrue($block_storage_controller->load(array($block_4->id())), 'A block from another display on the same view was unaffected.');
+    $this->assertFalse($block_storage_controller->load($block_3->id()), 'The block for this display was removed.');
+    $this->assertTrue($block_storage_controller->load($block_4->id()), 'A block from another display on the same view was unaffected.');
     $this->drupalGet('test-page');
     $this->assertNoBlockAppears($block_3);
     $this->assertBlockAppears($block_4);
@@ -114,18 +114,18 @@ public function testViewsBlockForm() {
     // Save the block.
     $this->drupalPost(NULL, array(), t('Save block'));
     $storage = $this->container->get('plugin.manager.entity')->getStorageController('block');
-    $blocks = $storage->load(array('stark.views_block__test_view_block_block_1'));
+    $block = $storage->load('stark.views_block__test_view_block_block_1');
     // This will only return a result if our new block has been created with the
     // expected machine name.
-    $this->assertTrue(!empty($blocks), 'The expected block was loaded.');
+    $this->assertTrue(!empty($block), 'The expected block was loaded.');
 
     for ($i = 2; $i <= 3; $i++) {
       // Place the same block again and make sure we have a new ID.
       $this->drupalPost('admin/structure/block/add/views_block:test_view_block-block_1/' . $default_theme, array(), t('Save block'));
-      $blocks = $storage->load(array('stark.views_block__test_view_block_block_1_' . $i));
+      $block = $storage->load('stark.views_block__test_view_block_block_1_' . $i);
       // This will only return a result if our new block has been created with the
       // expected machine name.
-      $this->assertTrue(!empty($blocks), 'The expected block was loaded.');
+      $this->assertTrue(!empty($block), 'The expected block was loaded.');
     }
   }
 
diff --git a/core/modules/book/lib/Drupal/book/BookManager.php b/core/modules/book/lib/Drupal/book/BookManager.php
index b037429..19140fa 100644
--- a/core/modules/book/lib/Drupal/book/BookManager.php
+++ b/core/modules/book/lib/Drupal/book/BookManager.php
@@ -79,7 +79,7 @@ protected function loadBooks() {
       $query->addMetaData('base_table', 'book');
       $book_links = $query->execute();
 
-      $nodes = $this->entityManager->getStorageController('node')->load($nids);
+      $nodes = $this->entityManager->getStorageController('node')->loadMultiple($nids);
 
       foreach ($book_links as $link) {
         $nid = $link['nid'];
diff --git a/core/modules/breakpoint/breakpoint.module b/core/modules/breakpoint/breakpoint.module
index b467011..9384b2a 100644
--- a/core/modules/breakpoint/breakpoint.module
+++ b/core/modules/breakpoint/breakpoint.module
@@ -294,8 +294,8 @@ function breakpoint_get_module_media_queries($module) {
  * @param string $id
  *   The id of the breakpoint group to load.
  *
- * @return Drupal\breakpoint\Plugin\Core\Entity\BreakpointGroup|false
- *   The breakpoint group, or FALSE if there is no entity with the given id.
+ * @return Drupal\breakpoint\Plugin\Core\Entity\BreakpointGroup|null
+ *   The breakpoint group, or NULL if there is no entity with the given id.
  *
  * @todo Remove this in a follow-up issue.
  * @see http://drupal.org/node/1798214
@@ -311,7 +311,7 @@ function breakpoint_group_load($id) {
  *   The id of the breakpoint to load.
  *
  * @return Drupal\breakpoint\Plugin\Core\Entity\Breakpoint
- *   The entity object, or FALSE if there is no entity with the given id.
+ *   The entity object, or NULL if there is no entity with the given id.
  *
  * @todo Remove this in a follow-up issue.
  * @see http://drupal.org/node/1798214
diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module
index 7cd4e70..0c6caf2 100644
--- a/core/modules/comment/comment.module
+++ b/core/modules/comment/comment.module
@@ -1216,7 +1216,7 @@ function comment_node_update_index(EntityInterface $node, $langcode) {
     // edit could change the security situation so it is not safe to index the
     // comments.
     $index_comments = TRUE;
-    $roles = Drupal::entityManager()->getStorageController('user_role')->load();
+    $roles = Drupal::entityManager()->getStorageController('user_role')->loadMultiple();
     $authenticated_can_access = $roles[DRUPAL_AUTHENTICATED_RID]->hasPermission('access comments');
     foreach ($roles as $rid => $role) {
       if ($role->hasPermission('search content') && !$role->hasPermission('access comments')) {
diff --git a/core/modules/contact/contact.module b/core/modules/contact/contact.module
index 64d97b2..d45d10b 100644
--- a/core/modules/contact/contact.module
+++ b/core/modules/contact/contact.module
@@ -232,8 +232,8 @@ function contact_field_extra_fields() {
  * @param $id
  *   The ID of the contact category to load.
  *
- * @return Drupal\contact\Plugin\Core\Entity\Category|false
- *   A Category object or FALSE if the requested $id does not exist.
+ * @return Drupal\contact\Plugin\Core\Entity\Category|null
+ *   A Category object or NULL if the requested $id does not exist.
  */
 function contact_category_load($id) {
   return entity_load('contact_category', $id);
diff --git a/core/modules/editor/editor.module b/core/modules/editor/editor.module
index 5a75c57..5c3877e 100644
--- a/core/modules/editor/editor.module
+++ b/core/modules/editor/editor.module
@@ -273,7 +273,7 @@ function editor_form_filter_admin_format_validate($form, &$form_state) {
   // 'Configure' button won't be clicked automatically. So, when the user has
   // selected a text editor and has then clicked 'Save configuration', we should
   // point out that the user must still configure the text editor.
-  if ($form_state['values']['editor']['editor'] !== '' && $form_state['editor'] === FALSE) {
+  if ($form_state['values']['editor']['editor'] !== '' && empty($form_state['editor'])) {
     form_set_error('editor][editor', t('You must configure the selected text editor.'));
   }
 }
@@ -290,7 +290,7 @@ function editor_form_filter_admin_format_submit($form, &$form_state) {
   }
 
   // Create a new editor or update the existing editor.
-  if ($form_state['editor'] !== FALSE) {
+  if (!empty($form_state['editor'])) {
     // Ensure the text format is set: when creating a new text format, this
     // would equal the empty string.
     $form_state['editor']->format = $format_id;
@@ -302,8 +302,8 @@ function editor_form_filter_admin_format_submit($form, &$form_state) {
 /**
  * Loads an individual configured text editor based on text format ID.
  *
- * @return \Drupal\editor\Plugin\Core\Entity\Editor|FALSE
- *   A text editor object, or FALSE.
+ * @return \Drupal\editor\Plugin\Core\Entity\Editor|null
+ *   A text editor object, or NULL.
  */
 function editor_load($format_id) {
   // Load all the editors at once here, assuming that either no editors or more
@@ -311,7 +311,7 @@ function editor_load($format_id) {
   // formats for administrators). Loading a small number of editors all at once
   // is more efficient than loading multiple editors individually.
   $editors = entity_load_multiple('editor');
-  return isset($editors[$format_id]) ? $editors[$format_id] : FALSE;
+  return isset($editors[$format_id]) ? $editors[$format_id] : NULL;
 }
 
 /**
diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php
index 6a42b57..6cfa0aa 100644
--- a/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php
+++ b/core/modules/entity_reference/lib/Drupal/entity_reference/EntityReferenceAutocomplete.php
@@ -65,8 +65,7 @@ public function getMatches($field, $instance, $entity_type, $entity_id = '', $pr
     $entity = NULL;
 
     if ($entity_id !== 'NULL') {
-      $entities = $this->entityManager->getStorageController($entity_type)->load(array($entity_id));
-      $entity = reset($entities);
+      $entity = $this->entityManager->getStorageController($entity_type)->load($entity_id);
       if (!$entity || !$entity->access('view')) {
         throw new AccessDeniedHttpException();
       }
diff --git a/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php b/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php
index 9535bee..f9ce249 100644
--- a/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php
+++ b/core/modules/field/lib/Drupal/field/FieldInstanceStorageController.php
@@ -117,11 +117,12 @@ public function loadByProperties(array $conditions = array()) {
     // Get instances stored in configuration.
     if (isset($conditions['entity_type']) && isset($conditions['bundle']) && isset($conditions['field_name'])) {
       // Optimize for the most frequent case where we do have a specific ID.
-      $instances = $this->entityManager->getStorageController($this->entityType)->load(array($conditions['entity_type'] . '.' . $conditions['bundle'] . '.' . $conditions['field_name']));
+      $id = $conditions['entity_type'] . '.' . $conditions['bundle'] . '.' . $conditions['field_name'];
+      $instances = $this->entityManager->getStorageController($this->entityType)->loadMultiple(array($id));
     }
     else {
       // No specific ID, we need to examine all existing instances.
-      $instances = $this->entityManager->getStorageController($this->entityType)->load();
+      $instances = $this->entityManager->getStorageController($this->entityType)->loadMultiple();
     }
 
     // Merge deleted instances (stored in state) if needed.
diff --git a/core/modules/field/lib/Drupal/field/FieldStorageController.php b/core/modules/field/lib/Drupal/field/FieldStorageController.php
index 07c6c71..41efe60 100644
--- a/core/modules/field/lib/Drupal/field/FieldStorageController.php
+++ b/core/modules/field/lib/Drupal/field/FieldStorageController.php
@@ -100,11 +100,11 @@ public function loadByProperties(array $conditions = array()) {
     // Get fields stored in configuration.
     if (isset($conditions['field_name'])) {
       // Optimize for the most frequent case where we do have a specific ID.
-      $fields = $this->entityManager->getStorageController($this->entityType)->load(array($conditions['field_name']));
+      $fields = $this->entityManager->getStorageController($this->entityType)->loadMultiple(array($conditions['field_name']));
     }
     else {
       // No specific ID, we need to examine all existing fields.
-      $fields = $this->entityManager->getStorageController($this->entityType)->load();
+      $fields = $this->entityManager->getStorageController($this->entityType)->loadMultiple();
     }
 
     // Merge deleted fields (stored in state) if needed.
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php
index 4af0fc2..1bb1ae4 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/Field.php
@@ -335,7 +335,7 @@ protected function saveNew() {
     }
 
     // Ensure the field name is unique (we do not care about deleted fields).
-    if ($prior_field = current($storage_controller->load(array($this->id)))) {
+    if ($prior_field = $storage_controller->load($this->id)) {
       $message = $prior_field->active ?
         'Attempt to create field name %id which already exists and is active.' :
         'Attempt to create field name %id which already exists, although it is inactive.';
@@ -455,7 +455,7 @@ public function delete() {
           $instance_ids[] = "$entity_type.$bundle.$this->id";
         }
       }
-      foreach ($instance_controller->load($instance_ids) as $instance) {
+      foreach ($instance_controller->loadMultiple($instance_ids) as $instance) {
         // By default, FieldInstance::delete() will automatically try to delete
         // a field definition when it is deleting the last instance of the
         // field. Since the whole field is being deleted here, pass FALSE as
diff --git a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php
index 5f7e435..cbfb636 100644
--- a/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php
+++ b/core/modules/field/lib/Drupal/field/Plugin/Core/Entity/FieldInstance.php
@@ -364,7 +364,7 @@ protected function saveNew() {
     $this->id = $this->id();
 
     // Ensure the field instance is unique within the bundle.
-    if ($prior_instance = current($instance_controller->load(array($this->id)))) {
+    if ($prior_instance = $instance_controller->load($this->id)) {
       throw new FieldException(format_string('Attempt to create an instance of field @field_id on bundle @bundle that already has an instance of that field.', array('@field_id' => $this->field->id, '@bundle' => $this->bundle)));
     }
 
diff --git a/core/modules/file/file.module b/core/modules/file/file.module
index 4a45b51..bcdb460 100644
--- a/core/modules/file/file.module
+++ b/core/modules/file/file.module
@@ -119,14 +119,13 @@ function file_load_multiple(array $fids = NULL, $reset = FALSE) {
  *   Whether to reset the internal file_load_multiple() cache.
  *
  * @return \Drupal\file\FileInterface
- *   A file entity or FALSE if the file was not found.
+ *   A file entity or NULL if the file was not found.
  *
  * @see hook_file_load()
  * @see file_load_multiple()
  */
 function file_load($fid, $reset = FALSE) {
-  $files = file_load_multiple(array($fid), $reset);
-  return reset($files);
+  return entity_load('file', $fid, $reset);
 }
 
 /**
diff --git a/core/modules/filter/filter.module b/core/modules/filter/filter.module
index 717d156..7930bd0 100644
--- a/core/modules/filter/filter.module
+++ b/core/modules/filter/filter.module
@@ -169,7 +169,7 @@ function filter_local_actions() {
  * @return
  *   A fully-populated text format object, if the requested format exists and
  *   is enabled. If the format does not exist, or exists in the database but
- *   has been marked as disabled, FALSE is returned.
+ *   has been marked as disabled, NULL is returned.
  *
  * @see filter_format_exists()
  *
@@ -177,7 +177,7 @@ function filter_local_actions() {
  */
 function filter_format_load($format_id) {
   $formats = filter_formats();
-  return isset($formats[$format_id]) ? $formats[$format_id] : FALSE;
+  return isset($formats[$format_id]) ? $formats[$format_id] : NULL;
 }
 
 /**
diff --git a/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php b/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php
index 8c6571f..c2ca51b 100644
--- a/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php
+++ b/core/modules/filter/lib/Drupal/filter/FilterFormatListController.php
@@ -192,7 +192,7 @@ public function validateForm(array &$form, array &$form_state) {
   public function submitForm(array &$form, array &$form_state) {
     $values = $form_state['values']['formats'];
 
-    $entities = $this->storage->load(array_keys($values));
+    $entities = $this->storage->loadMultiple(array_keys($values));
     foreach ($values as $id => $value) {
       if (isset($entities[$id]) && $value['weight'] != $entities[$id]->get('weight')) {
         // Update changed weight.
diff --git a/core/modules/forum/lib/Drupal/forum/ForumBreadcrumbBuilder.php b/core/modules/forum/lib/Drupal/forum/ForumBreadcrumbBuilder.php
index 3bbb0df..5e1dbf1 100644
--- a/core/modules/forum/lib/Drupal/forum/ForumBreadcrumbBuilder.php
+++ b/core/modules/forum/lib/Drupal/forum/ForumBreadcrumbBuilder.php
@@ -81,8 +81,7 @@ public function build(array $attributes) {
    * Builds the breadcrumb for a forum post page.
    */
   protected function forumPostBreadcrumb($node) {
-    $vocabularies = $this->entityManager->getStorageController('taxonomy_vocabulary')->load(array($this->config->get('vocabulary')));
-    $vocabulary = reset($vocabularies);
+    $vocabulary = $this->entityManager->getStorageController('taxonomy_vocabulary')->load($this->config->get('vocabulary'));
 
     $breadcrumb[] = l(t('Home'), NULL);
     $breadcrumb[] = l($vocabulary->label(), 'forum');
@@ -99,8 +98,7 @@ protected function forumPostBreadcrumb($node) {
    * Builds the breadcrumb for a forum term page.
    */
   protected function forumTermBreadcrumb($term) {
-    $vocabularies = $this->entityManager->getStorageController('taxonomy_vocabulary')->load(array($this->config->get('vocabulary')));
-    $vocabulary = current($vocabularies);
+    $vocabulary = $this->entityManager->getStorageController('taxonomy_vocabulary')->load($this->config->get('vocabulary'));
 
     $breadcrumb[] = l(t('Home'), NULL);
     if ($term->tid) {
diff --git a/core/modules/image/image.module b/core/modules/image/image.module
index 5eda365..ce1e19a 100644
--- a/core/modules/image/image.module
+++ b/core/modules/image/image.module
@@ -772,7 +772,7 @@ function image_effect_definitions() {
  */
 function image_effect_definition_load($effect) {
   $definitions = image_effect_definitions();
-  return isset($definitions[$effect]) ? $definitions[$effect] : FALSE;
+  return isset($definitions[$effect]) ? $definitions[$effect] : NULL;
 }
 
 /**
@@ -790,7 +790,7 @@ function image_effect_definition_load($effect) {
  *   - "name": The name of the effect definition that powers this image effect.
  *   - "data": An array of configuration options for this image effect.
  *   Besides these keys, the entirety of the image definition is merged into
- *   the image effect array. Returns FALSE if the specified effect cannot be
+ *   the image effect array. Returns NULL if the specified effect cannot be
  *   found.
  * @see image_effect_definition_load()
  */
@@ -809,7 +809,7 @@ function image_effect_load($ieid, $style_name) {
     $effect['ieid'] = $ieid;
     return $effect;
   }
-  return FALSE;
+  return NULL;
 }
 
 /**
diff --git a/core/modules/layout/tests/lib/Drupal/layout_test/Controller/LayoutTestController.php b/core/modules/layout/tests/lib/Drupal/layout_test/Controller/LayoutTestController.php
index e87a667..a1ca946 100644
--- a/core/modules/layout/tests/lib/Drupal/layout_test/Controller/LayoutTestController.php
+++ b/core/modules/layout/tests/lib/Drupal/layout_test/Controller/LayoutTestController.php
@@ -52,8 +52,7 @@ public function layoutTestPage() {
     $theme = 'layout_test_theme';
     theme_enable(array($theme));
 
-    $displays = $this->entityStorageController->load(array('test_twocol'));
-    $display = reset($displays);
+    $display = $this->entityStorageController->load('test_twocol');
     $layout = $display->getLayoutInstance();
 
     // @todo This tests that the layout can render its regions, but does not test
diff --git a/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php b/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php
index 60129fa..599ba39 100644
--- a/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php
+++ b/core/modules/menu/lib/Drupal/menu/Form/MenuDeleteForm.php
@@ -104,7 +104,7 @@ public function submit(array $form, array &$form_state) {
     // Reset all the menu links defined by the system via hook_menu().
     // @todo Convert this to an EFQ once we figure out 'ORDER BY m.number_parts'.
     $result = $this->connection->query("SELECT mlid FROM {menu_links} ml INNER JOIN {menu_router} m ON ml.router_path = m.path WHERE ml.menu_name = :menu AND ml.module = 'system' ORDER BY m.number_parts ASC", array(':menu' => $this->entity->id()), array('fetch' => \PDO::FETCH_ASSOC))->fetchCol();
-    $menu_links = $this->storageController->load($result);
+    $menu_links = $this->storageController->loadMultiple($result);
     foreach ($menu_links as $link) {
       $link->reset();
     }
diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module
index 18b0ee5..291c9dd 100644
--- a/core/modules/menu/menu.module
+++ b/core/modules/menu/menu.module
@@ -239,7 +239,7 @@ function menu_enable() {
  * @param $menu_name
  *   The unique name of a custom menu to load.
  * @return
- *   Array defining the custom menu, or FALSE if the menu doesn't exist.
+ *   Array defining the custom menu, or NULL if the menu doesn't exist.
  */
 function menu_load($menu_name) {
   return entity_load('menu', $menu_name);
diff --git a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php
index 90fbdbb..43d54ce 100644
--- a/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php
+++ b/core/modules/menu_link/lib/Drupal/menu_link/MenuLinkStorageController.php
@@ -262,7 +262,7 @@ public function loadModuleAdminTasks() {
       ->condition('m.page_callback', 'system_admin_menu_block_page', '<>');
     $ids = $query->execute()->fetchCol(1);
 
-    return $this->load($ids);
+    return $this->loadMultiple($ids);
   }
 
   /**
@@ -393,8 +393,7 @@ public function getParentFromHierarchy(EntityInterface $entity) {
       $result = $query->execute();
       // Only valid if we get a unique result.
       if (count($result) == 1) {
-        $parent = $this->load($result);
-        $parent = reset($parent);
+        $parent = $this->load(reset($result));
       }
     } while ($parent === FALSE && $parent_path);
 
diff --git a/core/modules/menu_link/lib/Drupal/menu_link/Plugin/Core/Entity/MenuLink.php b/core/modules/menu_link/lib/Drupal/menu_link/Plugin/Core/Entity/MenuLink.php
index c3cd2fe..7f227f8 100644
--- a/core/modules/menu_link/lib/Drupal/menu_link/Plugin/Core/Entity/MenuLink.php
+++ b/core/modules/menu_link/lib/Drupal/menu_link/Plugin/Core/Entity/MenuLink.php
@@ -571,8 +571,7 @@ public function findParent(EntityStorageControllerInterface $storage_controller,
         $parent = $parent_candidates[$mlid];
       }
       else {
-        $parent = $storage_controller->load(array($mlid));
-        $parent = reset($parent);
+        $parent = $storage_controller->load($mlid);
       }
       if ($parent) {
         return $parent;
diff --git a/core/modules/menu_link/menu_link.module b/core/modules/menu_link/menu_link.module
index 80785f9..222aa83 100644
--- a/core/modules/menu_link/menu_link.module
+++ b/core/modules/menu_link/menu_link.module
@@ -31,8 +31,8 @@ function menu_link_uri(MenuLink $menu_link) {
  * @param bool $reset
  *   (optional) Whether to reset the menu_link_load_multiple() cache.
  *
- * @return \Drupal\menu_link\Plugin\Core\Entity\MenuLink|false
- *   A menu link entity, or FALSE if there is no entity with the given ID.
+ * @return \Drupal\menu_link\Plugin\Core\Entity\MenuLink|null
+ *   A menu link entity, or NULL if there is no entity with the given ID.
  */
 function menu_link_load($mlid = NULL, $reset = FALSE) {
   return entity_load('menu_link', $mlid, $reset);
@@ -98,10 +98,10 @@ function menu_link_delete_multiple(array $mlids, $force = FALSE, $prevent_repare
     $entity_query->condition($group);
 
     $result = $entity_query->execute();
-    $entities = $controller->load($result);
+    $entities = $controller->loadMultiple($result);
   }
   else {
-    $entities = $controller->load($mlids);
+    $entities = $controller->loadMultiple($mlids);
   }
   $controller->setPreventReparenting($prevent_reparenting);
   $controller->delete($entities);
diff --git a/core/modules/node/node.module b/core/modules/node/node.module
index 1730572..fbc66fe 100644
--- a/core/modules/node/node.module
+++ b/core/modules/node/node.module
@@ -371,7 +371,7 @@ function node_type_get_description(NodeTypeInterface $node_type) {
  *   The machine name of a node type to load.
  *
  * @return \Drupal\node\NodeTypeInterface
- *   A node type object or FALSE if $name does not exist.
+ *   A node type object or NULL if $name does not exist.
  */
 function node_type_load($name) {
   return entity_load('node_type', $name);
@@ -579,12 +579,12 @@ function node_load_multiple(array $nids = NULL, $reset = FALSE) {
  *   (optional) Whether to reset the node_load_multiple() cache. Defaults to
  *   FALSE.
  *
- * @return Drupal\node\Node|false
- *   A fully-populated node entity, or FALSE if the node is not found.
+ * @return Drupal\node\Node|null
+ *   A fully-populated node entity, or NULL if the node is not found.
  */
 function node_load($nid = NULL, $reset = FALSE) {
   $entity = entity_load('node', $nid, $reset);
-  return $entity ? $entity->getBCEntity() : FALSE;
+  return $entity ? $entity->getBCEntity() : NULL;
 }
 
 /**
@@ -593,8 +593,8 @@ function node_load($nid = NULL, $reset = FALSE) {
  * @param int $nid
  *   The node revision id.
  *
- * @return Drupal\node\Node|false
- *   A fully-populated node entity, or FALSE if the node is not found.
+ * @return Drupal\node\Node|null
+ *   A fully-populated node entity, or NULL if the node is not found.
  */
 function node_revision_load($vid = NULL) {
   return entity_revision_load('node', $vid);
diff --git a/core/modules/picture/picture.module b/core/modules/picture/picture.module
index ef6ee48..08494df 100644
--- a/core/modules/picture/picture.module
+++ b/core/modules/picture/picture.module
@@ -105,7 +105,7 @@ function picture_library_info() {
  *   The id of the picture mapping to load.
  *
  * @return Drupal\picture\Picture
- *   The entity object, or FALSE if there is no entity with the given id.
+ *   The entity object, or NULL if there is no entity with the given id.
  *
  * @todo Needed for menu_callback
  *
diff --git a/core/modules/shortcut/shortcut.module b/core/modules/shortcut/shortcut.module
index d49ce04..2e1c025 100644
--- a/core/modules/shortcut/shortcut.module
+++ b/core/modules/shortcut/shortcut.module
@@ -269,7 +269,7 @@ function shortcut_menu_link_delete($menu_link) {
  *   - 'id': The internal name of the shortcut set.
  *   - 'label': The title of the shortcut set.
  *   - 'links': An array of links associated with this shortcut set.
- *   If the shortcut set does not exist, the function returns FALSE.
+ *   If the shortcut set does not exist, the function returns NULL.
  */
 function shortcut_set_load($id) {
   return entity_load('shortcut', $id);
diff --git a/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php
index 9d21660..f7c5ea2 100644
--- a/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php
+++ b/core/modules/system/lib/Drupal/system/Plugin/views/field/BulkFormBase.php
@@ -39,7 +39,7 @@
   public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityManager $manager) {
     parent::__construct($configuration, $plugin_id, $plugin_definition);
 
-    $this->actions = $manager->getStorageController('action')->load();
+    $this->actions = $manager->getStorageController('action')->loadMultiple();
   }
 
   /**
diff --git a/core/modules/system/lib/Drupal/system/Tests/Action/ActionUnitTest.php b/core/modules/system/lib/Drupal/system/Tests/Action/ActionUnitTest.php
index 1c08aca..87e5113 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Action/ActionUnitTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Action/ActionUnitTest.php
@@ -72,12 +72,12 @@ public function testOperations() {
     $name = $this->randomName();
     $user_storage = $this->container->get('plugin.manager.entity')->getStorageController('user');
     $account = $user_storage->create(array('name' => $name, 'bundle' => 'user'));
-    $loaded_accounts = $user_storage->load();
+    $loaded_accounts = $user_storage->loadMultiple();
     $this->assertEqual(count($loaded_accounts), 0);
 
     // Execute the 'save entity' action.
     $action->execute($account);
-    $loaded_accounts = $user_storage->load();
+    $loaded_accounts = $user_storage->loadMultiple();
     $this->assertEqual(count($loaded_accounts), 1);
     $account = reset($loaded_accounts);
     $this->assertEqual($name, $account->label());
diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/SystemUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/SystemUpgradePathTest.php
index 5d35e32..67ec268 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/SystemUpgradePathTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/SystemUpgradePathTest.php
@@ -189,8 +189,7 @@ public function testFrontpageUpgrade() {
     $this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.');
 
     $this->assertTrue($this->container->get('module_handler')->moduleExists('views'), 'Views is enabled after the upgrade.');
-    $views = $this->container->get('plugin.manager.entity')->getStorageController('view')->load(array('frontpage'));
-    $view = reset($views);
+    $view = $this->container->get('plugin.manager.entity')->getStorageController('view')->load('frontpage');
     $this->assertTrue($view->status(), 'The frontpage view is enabled after the upgrade.');
   }
 
diff --git a/core/modules/system/system.api.php b/core/modules/system/system.api.php
index 36e9f77..9d2e64e 100644
--- a/core/modules/system/system.api.php
+++ b/core/modules/system/system.api.php
@@ -663,9 +663,9 @@ function hook_menu_get_item_alter(&$router_item, $path, $original_map) {
  * This 'abc' object will then be passed into the callback functions defined
  * for the menu item, such as the page callback function mymodule_abc_edit()
  * to replace the integer 1 in the argument array. Note that a load function
- * should return FALSE when it is unable to provide a loadable object. For
+ * should return NULL when it is unable to provide a loadable object. For
  * example, the node_load() function for the 'node/%node/edit' menu item will
- * return FALSE for the path 'node/999/edit' if a node with a node ID of 999
+ * return NULL for the path 'node/999/edit' if a node with a node ID of 999
  * does not exist. The menu routing system will return a 404 error in this case.
  *
  * @subsection sub_argument_wildcards Argument Wildcards
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module
index 55d0dac..5f2c46f 100644
--- a/core/modules/system/tests/modules/entity_test/entity_test.module
+++ b/core/modules/system/tests/modules/entity_test/entity_test.module
@@ -285,7 +285,7 @@ function entity_test_edit(EntityInterface $entity) {
  *   A boolean indicating that the internal cache should be reset.
  *
  * @return \Drupal\entity_test\Plugin\Core\Entity\EntityTest
- *   The loaded entity object, or FALSE if the entity cannot be loaded.
+ *   The loaded entity object, or NULL if the entity cannot be loaded.
  */
 function entity_test_load($id, $reset = FALSE) {
   return entity_load('entity_test', $id, $reset);
@@ -300,7 +300,7 @@ function entity_test_load($id, $reset = FALSE) {
  *   A boolean indicating that the internal cache should be reset.
  *
  * @return \Drupal\entity_test\Plugin\Core\Entity\EntityTestRev
- *   The loaded entity object, or FALSE if the entity cannot be loaded.
+ *   The loaded entity object, or NULL if the entity cannot be loaded.
  */
 function entity_test_rev_load($id, $reset = FALSE) {
   return entity_load('entity_test_rev', $id, $reset);
@@ -330,7 +330,7 @@ function entity_test_mul_load($id, $reset = FALSE) {
  *   A boolean indicating that the internal cache should be reset.
  *
  * @return \Drupal\entity_test\Plugin\Core\Entity\EntityTestMulRev
- *   The loaded entity object, or FALSE if the entity cannot be loaded.
+ *   The loaded entity object, or NULL if the entity cannot be loaded.
  */
 function entity_test_mulrev_load($id, $reset = FALSE) {
   return entity_load('entity_test_mulrev', $id, $reset);
diff --git a/core/modules/system/tests/modules/menu_test/menu_test.module b/core/modules/system/tests/modules/menu_test/menu_test.module
index b5c0c47..f8792cc 100644
--- a/core/modules/system/tests/modules/menu_test/menu_test.module
+++ b/core/modules/system/tests/modules/menu_test/menu_test.module
@@ -529,12 +529,12 @@ function menu_test_menu_local_tasks_alter(&$data, $router_item, $root_path) {
  *   A parameter passed in via the URL.
  *
  * @return false
- *   Always return FALSE.
+ *   Always return NULL.
  *
  * @see menu_test_menu();
  */
 function menu_test_argument_load($arg1) {
-  return FALSE;
+  return NULL;
 }
 
 /**
@@ -544,12 +544,12 @@ function menu_test_argument_load($arg1) {
  *   A parameter passed in via the URL.
  *
  * @return false
- *   Always return FALSE.
+ *   Always return NULL.
  *
  * @see menu_test_menu();
  */
 function menu_test_other_argument_load($arg1) {
-  return FALSE;
+  return NULL;
 }
 
 /**
diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module
index c21b665..fd2ee73 100644
--- a/core/modules/taxonomy/taxonomy.module
+++ b/core/modules/taxonomy/taxonomy.module
@@ -835,8 +835,8 @@ function taxonomy_vocabulary_sort(array &$vocabularies = array()) {
  * @param int $vid
  *   The vocabulary's ID.
  *
- * @return Drupal\taxonomy\Plugin\Core\Entity\Vocabulary|false
- *   The taxonomy vocabulary entity, if exists, FALSE otherwise. Results are
+ * @return Drupal\taxonomy\Plugin\Core\Entity\Vocabulary|null
+ *   The taxonomy vocabulary entity, if exists, NULL otherwise. Results are
  *   statically cached.
  */
 function taxonomy_vocabulary_load($vid) {
@@ -849,13 +849,13 @@ function taxonomy_vocabulary_load($vid) {
  * @param $tid
  *   A term's ID
  *
- * @return Drupal\taxonomy\Plugin\Core\Entity\Term|false
- *   A taxonomy term entity, or FALSE if the term was not found. Results are
+ * @return Drupal\taxonomy\Plugin\Core\Entity\Term|null
+ *   A taxonomy term entity, or NULL if the term was not found. Results are
  *   statically cached.
  */
 function taxonomy_term_load($tid) {
   if (!is_numeric($tid)) {
-    return FALSE;
+    return NULL;
   }
   return entity_load('taxonomy_term', $tid);
 }
diff --git a/core/modules/user/lib/Drupal/user/Form/UserLoginForm.php b/core/modules/user/lib/Drupal/user/Form/UserLoginForm.php
index 93236f1..ab29ffa 100644
--- a/core/modules/user/lib/Drupal/user/Form/UserLoginForm.php
+++ b/core/modules/user/lib/Drupal/user/Form/UserLoginForm.php
@@ -132,8 +132,7 @@ public function validateForm(array &$form, array &$form_state) {
    * {@inheritdoc}
    */
   public function submitForm(array &$form, array &$form_state) {
-    $accounts = $this->storageController->load(array($form_state['uid']));
-    $account = reset($accounts)->getBCEntity();
+    $account = $this->storageController->load($form_state['uid']);
     $form_state['redirect'] = 'user/' . $account->id();
 
     user_login_finalize($account);
diff --git a/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/Role.php b/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/Role.php
index d35d7f1..4c6602a 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/Role.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/Core/Entity/Role.php
@@ -123,7 +123,7 @@ public function revokePermission($permission) {
    * {@inheritdoc}
    */
   public function preSave(EntityStorageControllerInterface $storage_controller) {
-    if (!isset($this->weight) && ($roles = $storage_controller->load())) {
+    if (!isset($this->weight) && ($roles = $storage_controller->loadMultiple())) {
       // Set a role weight to make this new role last.
       $max = array_reduce($roles, function($max, $role) {
         return $max > $role->weight ? $max : $role->weight;
diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/argument/RolesRid.php b/core/modules/user/lib/Drupal/user/Plugin/views/argument/RolesRid.php
index f657090..df8f879 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/views/argument/RolesRid.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/views/argument/RolesRid.php
@@ -58,7 +58,7 @@ public static function create(ContainerInterface $container, array $configuratio
    * {@inheritdoc}
    */
   public function title_query() {
-    $entities = $this->roleStorageController->load($this->value);
+    $entities = $this->roleStorageController->loadMultiple($this->value);
     $titles = array();
     foreach ($entities as $entity) {
       $titles[] = String::checkPlain($entity->label());
diff --git a/core/modules/user/lib/Drupal/user/Plugin/views/field/Permissions.php b/core/modules/user/lib/Drupal/user/Plugin/views/field/Permissions.php
index 6bee40c..d4f0c79 100644
--- a/core/modules/user/lib/Drupal/user/Plugin/views/field/Permissions.php
+++ b/core/modules/user/lib/Drupal/user/Plugin/views/field/Permissions.php
@@ -97,7 +97,7 @@ public function preRender(&$values) {
     }
 
     if ($rids) {
-      $roles = $this->roleStorageController->load(array_keys($rids));
+      $roles = $this->roleStorageController->loadMultiple(array_keys($rids));
       foreach ($rids as $rid => $role_uids) {
         foreach ($roles[$rid]->getPermissions() as $permission) {
           foreach ($role_uids as $uid) {
diff --git a/core/modules/user/user.module b/core/modules/user/user.module
index 74d3743..ca957d3 100644
--- a/core/modules/user/user.module
+++ b/core/modules/user/user.module
@@ -300,14 +300,14 @@ function user_load_multiple(array $uids = NULL, $reset = FALSE) {
  *   (default) to load from the internal cache, if set.
  *
  * @return object
- *   A fully-loaded user object upon successful user load, or FALSE if the user
+ *   A fully-loaded user object upon successful user load, or NULL if the user
  *   cannot be loaded.
  *
  * @see user_load_multiple()
  */
 function user_load($uid, $reset = FALSE) {
   $user = entity_load('user', $uid, $reset);
-  return $user ? $user->getBCEntity() : FALSE;
+  return $user ? $user->getBCEntity() : NULL;
 }
 
 /**
@@ -1090,7 +1090,7 @@ function user_uid_only_optional_to_arg($arg) {
  *   An optional user ID of the user to load. If not provided, the current
  *   user's ID will be used.
  * @return
- *   A fully-loaded $user object upon successful user load, FALSE if user
+ *   A fully-loaded $user object upon successful user load, NULL if user
  *   cannot be loaded.
  *
  * @see user_load()
@@ -1705,7 +1705,7 @@ function user_roles($membersonly = FALSE, $permission = NULL) {
  *   A string representing the role ID.
  *
  * @return
- *   A fully-loaded role object if a role with the given ID exists, or FALSE
+ *   A fully-loaded role object if a role with the given ID exists, or NULL
  *   otherwise.
  */
 function user_role_load($rid) {
diff --git a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php
index 270ed26..8a0c919 100644
--- a/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php
+++ b/core/modules/views/lib/Drupal/views/Plugin/Block/ViewsBlock.php
@@ -128,7 +128,7 @@ public function generateBlockInstanceID(EntityStorageControllerInterface $manage
      $block_ids = array_map(function ($block_id) {
        $parts = explode('.', $block_id);
        return end($parts);
-     }, array_keys($manager->load()));
+     }, array_keys($manager->loadMultiple()));
 
      // Iterate through potential IDs until we get a new one. E.g.
      // 'views_block__MYVIEW_PAGE_1_2'
diff --git a/core/modules/views/lib/Drupal/views/Routing/ViewPageController.php b/core/modules/views/lib/Drupal/views/Routing/ViewPageController.php
index 64181b4..3c0b5d9 100644
--- a/core/modules/views/lib/Drupal/views/Routing/ViewPageController.php
+++ b/core/modules/views/lib/Drupal/views/Routing/ViewPageController.php
@@ -63,8 +63,7 @@ public function handle(Request $request) {
     $view_id = $request->attributes->get('view_id');
     $display_id = $request->attributes->get('display_id');
 
-    $entities = $this->storageController->load(array($view_id));
-    $entity = reset($entities);
+    $entity = $this->storageController->load($view_id);
     if (empty($entity)) {
       throw new NotFoundHttpException(format_string('Page controller for view %id requested, but view was not found.', array('%id' => $view_id)));
     }
diff --git a/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php b/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php
index cdbff1a..1fa8689 100644
--- a/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/DefaultViewsTest.php
@@ -114,7 +114,7 @@ protected function setUp() {
   public function testDefaultViews() {
     // Get all default views.
     $controller = $this->container->get('plugin.manager.entity')->getStorageController('view');
-    $views = $controller->load();
+    $views = $controller->loadMultiple();
 
     foreach ($views as $name => $view_storage) {
       $view = $view_storage->get('executable');
diff --git a/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php b/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php
index 103571f..8c85444 100644
--- a/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/ModuleTest.php
@@ -154,15 +154,14 @@ public function testLoadFunctions() {
     $controller = $this->container->get('plugin.manager.entity')->getStorageController('view');
 
     // Test views_view_is_enabled/disabled.
-    $load = $controller->load(array('archive'));
-    $archive = reset($load);
+    $archive = $controller->load('archive');
     $this->assertTrue(views_view_is_disabled($archive), 'views_view_is_disabled works as expected.');
     // Enable the view and check this.
     $archive->enable();
     $this->assertTrue(views_view_is_enabled($archive), ' views_view_is_enabled works as expected.');
 
     // We can store this now, as we have enabled/disabled above.
-    $all_views = $controller->load();
+    $all_views = $controller->loadMultiple();
 
     // Test views_get_all_views().
     $this->assertIdentical(array_keys($all_views), array_keys(views_get_all_views()), 'views_get_all_views works as expected.');
diff --git a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayFeedTest.php b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayFeedTest.php
index 8cd8880..120040f 100644
--- a/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayFeedTest.php
+++ b/core/modules/views/lib/Drupal/views/Tests/Plugin/DisplayFeedTest.php
@@ -92,8 +92,7 @@ public function testFeedOutput() {
     $result = $this->xpath('//title');
     $this->assertEqual($result[0], $site_name, 'The site title is used for the feed title.');
 
-    $views = $this->container->get('plugin.manager.entity')->getStorageController('view')->load(array('test_feed_display'));
-    $view = array_pop($views);
+    $view = $this->container->get('plugin.manager.entity')->getStorageController('view')->load('test_feed_display');
     $display = &$view->getDisplay('feed_1');
     $display['display_options']['sitename_title'] = 0;
     $view->save();
diff --git a/core/modules/views/lib/Drupal/views/ViewStorageController.php b/core/modules/views/lib/Drupal/views/ViewStorageController.php
index a7e1319..7dc9e69 100644
--- a/core/modules/views/lib/Drupal/views/ViewStorageController.php
+++ b/core/modules/views/lib/Drupal/views/ViewStorageController.php
@@ -16,10 +16,10 @@
 class ViewStorageController extends ConfigStorageController {
 
   /**
-   * Overrides Drupal\config\ConfigStorageController::load();
+   * Overrides Drupal\config\ConfigStorageController::loadMultiple();
    */
-  public function load(array $ids = NULL) {
-    $entities = parent::load($ids);
+  public function loadMultiple(array $ids = NULL) {
+    $entities = parent::loadMultiple($ids);
 
     // Only return views for enabled modules.
     return array_filter($entities, function ($entity) {
diff --git a/core/modules/views/views.module b/core/modules/views/views.module
index 5daa331..8d34788 100644
--- a/core/modules/views/views.module
+++ b/core/modules/views/views.module
@@ -927,7 +927,7 @@ function views_get_applicable_views($type) {
     ->execute();
 
   $result = array();
-  foreach (Drupal::entityManager()->getStorageController('view')->load($entity_ids) as $view) {
+  foreach (Drupal::entityManager()->getStorageController('view')->loadMultiple($entity_ids) as $view) {
     // Check each display to see if it meets the criteria and is enabled.
     $executable = $view->get('executable');
     $executable->initDisplay();
@@ -945,7 +945,7 @@ function views_get_applicable_views($type) {
  * Returns an array of all views as fully loaded $view objects.
  */
 function views_get_all_views() {
-  return Drupal::entityManager()->getStorageController('view')->load();
+  return Drupal::entityManager()->getStorageController('view')->loadMultiple();
 }
 
 /**
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Controller/ViewsUIController.php b/core/modules/views_ui/lib/Drupal/views_ui/Controller/ViewsUIController.php
index e4b1bfa..c9887f9 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Controller/ViewsUIController.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Controller/ViewsUIController.php
@@ -82,7 +82,7 @@ public static function create(ContainerInterface $container) {
    *   The Views fields report page.
    */
   public function reportFields() {
-    $views = $this->entityManager->getStorageController('view')->load();
+    $views = $this->entityManager->getStorageController('view')->loadMultiple();
 
     // Fetch all fieldapi fields which are used in views
     // Therefore search in all views, displays and handler-types.
@@ -199,7 +199,7 @@ public function autocompleteTag(Request $request) {
     $matches = array();
     $string = $request->query->get('q');
     // Get matches from default views.
-    $views = $this->entityManager->getStorageController('view')->load();
+    $views = $this->entityManager->getStorageController('view')->loadMultiple();
     foreach ($views as $view) {
       $tag = $view->get('tag');
       if ($tag && strpos($tag, $string) === 0) {
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php b/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php
index e33b3f5..052ab06 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Form/BreakLockForm.php
@@ -75,8 +75,8 @@ public function getQuestion() {
    */
   public function getDescription() {
     $locked = $this->tempStore->getMetadata($this->entity->id());
-    $accounts = $this->entityManager->getStorageController('user')->load(array($locked->owner));
-    return t('By breaking this lock, any unsaved changes made by !user will be lost.', array('!user' => theme('username', array('account' => reset($accounts)))));
+    $account = $this->entityManager->getStorageController('user')->load($locked->owner);
+    return t('By breaking this lock, any unsaved changes made by !user will be lost.', array('!user' => theme('username', array('account' => $account))));
   }
 
   /**
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/GroupByTest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/GroupByTest.php
index da8cf5f..40d80d4 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/GroupByTest.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/GroupByTest.php
@@ -52,8 +52,7 @@ function testGroupBySave() {
 
     $this->drupalPost(NULL, array(), t('Save'));
 
-    $views = $this->container->get('plugin.manager.entity')->getStorageController('view')->load(array('test_views_groupby_save'));
-    $view = reset($views);
+    $view = $this->container->get('plugin.manager.entity')->getStorageController('view')->load('test_views_groupby_save');
     $display = $view->getDisplay('default');
     $this->assertTrue($display['display_options']['group_by'], 'The groupby setting was saved on the view.');
     $this->assertEqual($display['display_options']['fields']['id']['group_type'], 'count', 'Count groupby_type was saved on the view.');
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/HandlerTest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/HandlerTest.php
index b8ab21e..f331257 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/HandlerTest.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/HandlerTest.php
@@ -108,8 +108,7 @@ public function testUICRUD() {
 
       // Save the view and have a look whether the handler was added as expected.
       $this->drupalPost(NULL, array(), t('Save'));
-      $views = $this->container->get('plugin.manager.entity')->getStorageController('view')->load(array('test_view_empty'));
-      $view = reset($views);
+      $view = $this->container->get('plugin.manager.entity')->getStorageController('view')->load('test_view_empty');
       $display = $view->getDisplay('default');
       $this->assertTrue(isset($display['display_options'][$type_info['plural']][$id]), 'Ensure the field was added to the view itself.');
 
@@ -118,8 +117,7 @@ public function testUICRUD() {
       $this->assertNoLinkByHref($edit_handler_url, 0, 'The handler edit link does not appears in the UI after removing.');
 
       $this->drupalPost(NULL, array(), t('Save'));
-      $views = $this->container->get('plugin.manager.entity')->getStorageController('view')->load(array('test_view_empty'));
-      $view = reset($views);
+      $view = $this->container->get('plugin.manager.entity')->getStorageController('view')->load('test_view_empty');
       $display = $view->getDisplay('default');
       $this->assertFalse(isset($display['display_options'][$type_info['plural']][$id]), 'Ensure the field was removed from the view itself.');
     }
@@ -140,8 +138,7 @@ public function testUICRUD() {
     $this->drupalPost(NULL, array(), t('Apply'));
 
     $this->drupalPost(NULL, array(), t('Save'));
-    $views = $this->container->get('plugin.manager.entity')->getStorageController('view')->load(array('test_view_empty'));
-    $view = reset($views);
+    $view = $this->container->get('plugin.manager.entity')->getStorageController('view')->load('test_view_empty');
     $display = $view->getDisplay('default');
     $this->assertTrue(isset($display['display_options'][$type_info['plural']][$id]), 'Ensure the field was added to the view itself.');
   }
-- 
1.7.9.6 (Apple Git-31.1)

