diff --git a/core/core.services.yml b/core/core.services.yml
index ca74a8c..b4bb044 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -355,7 +355,7 @@ services:
     arguments: ['@app.root', '@config.factory', '@module_handler', '@state', '@info_parser', '@logger.channel.default', '@asset.css.collection_optimizer', '@config.installer', '@config.manager', '@router.builder']
   entity.manager:
     class: Drupal\Core\Entity\EntityManager
-    arguments: ['@container.namespaces', '@module_handler', '@cache.discovery', '@language_manager', '@string_translation', '@class_resolver', '@typed_data_manager', '@entity.definitions.installed', '@event_dispatcher']
+    arguments: ['@container.namespaces', '@module_handler', '@cache.discovery', '@language_manager', '@string_translation', '@class_resolver', '@typed_data_manager', '@entity.definitions.installed', '@event_dispatcher', '@config.factory']
     parent: container.trait
     tags:
       - { name: plugin_manager_cache_clear }
diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php
index 3ab60f5..814a011 100644
--- a/core/lib/Drupal/Core/Entity/EntityManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityManager.php
@@ -10,14 +10,15 @@
 use Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException;
 use Drupal\Component\Plugin\Exception\PluginNotFoundException;
 use Drupal\Component\Utility\String;
+use Drupal\Core\Config\ConfigFactoryInterface;
+use Drupal\Core\DependencyInjection\ClassResolverInterface;
+use Drupal\Core\Field\BaseFieldDefinition;
 use Drupal\Core\Cache\Cache;
 use Drupal\Core\Cache\CacheBackendInterface;
 use Drupal\Core\Config\Entity\ConfigEntityType;
-use Drupal\Core\DependencyInjection\ClassResolverInterface;
 use Drupal\Core\Entity\Exception\AmbiguousEntityClassException;
 use Drupal\Core\Entity\Exception\NoCorrespondingEntityClassException;
 use Drupal\Core\Extension\ModuleHandlerInterface;
-use Drupal\Core\Field\BaseFieldDefinition;
 use Drupal\Core\Field\FieldStorageDefinitionEvent;
 use Drupal\Core\Field\FieldStorageDefinitionEvents;
 use Drupal\Core\Field\FieldStorageDefinitionInterface;
@@ -134,6 +135,13 @@ class EntityManager extends DefaultPluginManager implements EntityManagerInterfa
   protected $eventDispatcher;
 
   /**
+   * The config factory.
+   *
+   * @var \Drupal\Core\Config\ConfigFactoryInterface
+   */
+  protected $configFactory;
+
+  /**
    * Static cache of bundle information.
    *
    * @var array
@@ -196,8 +204,10 @@ class EntityManager extends DefaultPluginManager implements EntityManagerInterfa
    *   The keyvalue collection for tracking installed definitions.
    * @param \Symfony\Component\EventDispatcher\EventDispatcherInterface $event_dispatcher
    *   The event dispatcher.
+   * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
+   *   The config factory.
    */
-  public function __construct(\Traversable $namespaces, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache, LanguageManagerInterface $language_manager, TranslationInterface $translation_manager, ClassResolverInterface $class_resolver, TypedDataManager $typed_data_manager, KeyValueStoreInterface $installed_definitions, EventDispatcherInterface $event_dispatcher) {
+  public function __construct(\Traversable $namespaces, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache, LanguageManagerInterface $language_manager, TranslationInterface $translation_manager, ClassResolverInterface $class_resolver, TypedDataManager $typed_data_manager, KeyValueStoreInterface $installed_definitions, EventDispatcherInterface $event_dispatcher, ConfigFactoryInterface $config_factory) {
     parent::__construct('Entity', $namespaces, $module_handler, 'Drupal\Core\Entity\EntityInterface', 'Drupal\Core\Entity\Annotation\EntityType');
 
     $this->setCacheBackend($cache, 'entity_type', array('entity_types'));
@@ -209,6 +219,7 @@ public function __construct(\Traversable $namespaces, ModuleHandlerInterface $mo
     $this->typedDataManager = $typed_data_manager;
     $this->installedDefinitions = $installed_definitions;
     $this->eventDispatcher = $event_dispatcher;
+    $this->configFactory = $config_factory;
   }
 
   /**
@@ -968,15 +979,29 @@ protected function getDisplayModesByEntityType($display_type, $entity_type_id) {
   /**
    * {@inheritdoc}
    */
-  public function getViewModeOptions($entity_type, $include_disabled = FALSE) {
-    return $this->getDisplayModeOptions('view_mode', $entity_type, $include_disabled);
+  public function getViewModeOptions($entity_type_id) {
+    return $this->getDisplayModeOptions('view_mode', $entity_type_id);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getFormModeOptions($entity_type_id) {
+    return $this->getDisplayModeOptions('form_mode', $entity_type_id);
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function getViewModeOptionsByBundle($entity_type_id, $bundle, $include_disabled = FALSE) {
+    return $this->getDisplayModeOptionsByBundle('view_mode', $entity_type_id, $bundle, $include_disabled);
   }
 
   /**
    * {@inheritdoc}
    */
-  public function getFormModeOptions($entity_type, $include_disabled = FALSE) {
-    return $this->getDisplayModeOptions('form_mode', $entity_type, $include_disabled);
+  public function getFormModeOptionsByBundle($entity_type_id, $bundle, $include_disabled = FALSE) {
+    return $this->getDisplayModeOptionsByBundle('form_mode', $entity_type_id, $bundle, $include_disabled);
   }
 
   /**
@@ -986,23 +1011,62 @@ public function getFormModeOptions($entity_type, $include_disabled = FALSE) {
    *   The display type to be retrieved. It can be "view_mode" or "form_mode".
    * @param string $entity_type_id
    *   The entity type whose display mode options should be returned.
-   * @param bool $include_disabled
-   *   Force to include disabled display modes. Defaults to FALSE.
    *
    * @return array
    *   An array of display mode labels, keyed by the display mode ID.
    */
-  protected function getDisplayModeOptions($display_type, $entity_type_id, $include_disabled = FALSE) {
+  protected function getDisplayModeOptions($display_type, $entity_type_id) {
     $options = array('default' => t('Default'));
     foreach ($this->getDisplayModesByEntityType($display_type, $entity_type_id) as $mode => $settings) {
-      if (!empty($settings['status']) || $include_disabled) {
-        $options[$mode] = $settings['label'];
-      }
+      $options[$mode] = $settings['label'];
     }
     return $options;
   }
 
   /**
+   * Returns an array of display mode options for a certain bundle.
+   *
+   * @param $display_type
+   * The display type to be retrieved. It can be "view_mode" or "form_mode".
+   * @param string $entity_type_id
+   *   The entity type whose display mode options should be returned.
+   * @param string $bundle
+   *   The name of the bundle.
+   * @param bool $include_disabled
+   *   Force to include disabled view modes. Defaults to FALSE.
+   *
+   * @return array
+   *   An array of display mode labels, keyed by the display mode ID.
+   */
+  protected function getDisplayModeOptionsByBundle($display_type, $entity_type_id, $bundle, $include_disabled) {
+    $load_ids = array();
+    $display_mode_options = array();
+    $display_type_entity_name = ($display_type == 'form_mode') ? 'entity_form_display' : 'entity_view_display';
+    $entity_type = $this->getDefinition($display_type_entity_name);
+    $config_prefix = $entity_type->getConfigPrefix();
+
+    // Load all the entity's display modes.
+    $display_modes = $this->getDisplayModesByEntityType($display_type, $entity_type_id);
+
+    // Get the list of available display modes for the current block's bundle.
+    $ids = $this->configFactory->listAll($config_prefix . '.' . $entity_type_id . '.' . $bundle);
+    foreach ($ids as $id) {
+      $load_ids[] = str_replace($config_prefix . '.', '', $id);
+    }
+    $displays = entity_load_multiple($display_type_entity_name, $load_ids);
+
+    // Generate the display options array.
+    foreach ($displays as $display) {
+      if ($display->status() || $include_disabled) {
+        $display_mode_name = $display->get('mode');
+        $display_mode_options[$display_mode_name] = ($display_mode_name == 'default') ? t('Default') : $display_modes[$display_mode_name]['label'];
+      }
+    }
+
+    return $display_mode_options;
+  }
+
+  /**
    * {@inheritdoc}
    */
   public function loadEntityByUuid($entity_type_id, $uuid) {
diff --git a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
index b3bda8b..13bbb9a 100644
--- a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
+++ b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php
@@ -431,26 +431,52 @@ public function getFormModes($entity_type_id);
    *
    * @param string $entity_type_id
    *   The entity type whose view mode options should be returned.
+   *
+   * @return array
+   *   An array of view mode labels, keyed by the display mode ID.
+   */
+  public function getViewModeOptions($entity_type_id);
+
+  /**
+   * Returns an array of form mode options.
+   *
+   * @param string $entity_type_id
+   *   The entity type whose form mode options should be returned.
+   *
+   * @return array
+   *   An array of form mode labels, keyed by the display mode ID.
+   */
+  public function getFormModeOptions($entity_type_id);
+
+  /**
+   * Returns an array of view mode options by bundle.
+   *
+   * @param string $entity_type_id
+   *   The entity type whose view mode options should be returned.
+   * @param string $bundle
+   *   The name of the bundle.
    * @param bool $include_disabled
    *   Force to include disabled view modes. Defaults to FALSE.
    *
    * @return array
    *   An array of view mode labels, keyed by the display mode ID.
    */
-  public function getViewModeOptions($entity_type_id, $include_disabled = FALSE);
+  public function getViewModeOptionsByBundle($entity_type_id, $bundle, $include_disabled  = FALSE);
 
   /**
-   * Returns an array of form mode options.
+   * Returns an array of form mode options by bundle.
    *
    * @param string $entity_type_id
    *   The entity type whose form mode options should be returned.
+   * @param string $bundle
+   *   The name of the bundle.
    * @param bool $include_disabled
    *   Force to include disabled form modes. Defaults to FALSE.
    *
    * @return array
    *   An array of form mode labels, keyed by the display mode ID.
    */
-  public function getFormModeOptions($entity_type_id, $include_disabled = FALSE);
+  public function getFormModeOptionsByBundle($entity_type_id, $bundle, $include_disabled = FALSE);
 
   /**
    * Loads an entity by UUID.
diff --git a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php
index e59eefd..d29a657 100644
--- a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php
+++ b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php
@@ -113,7 +113,9 @@ public function defaultConfiguration() {
    * Adds body and description fields to the block configuration form.
    */
   public function blockForm($form, FormStateInterface $form_state) {
-    $options = $this->entityManager->getViewModeOptions('block_content');
+    $uuid = $this->getDerivativeId();
+    $block = $this->entityManager->loadEntityByUuid('block_content', $uuid);
+    $options = $this->entityManager->getViewModeOptionsByBundle('block_content', $block->bundle());
     $form['view_mode'] = array(
       '#type' => 'select',
       '#options' => $options,
@@ -153,4 +155,5 @@ public function build() {
       );
     }
   }
+
 }
diff --git a/core/modules/block_content/src/Tests/BlockContentCreationTest.php b/core/modules/block_content/src/Tests/BlockContentCreationTest.php
index 6bf250c..15a8a12 100644
--- a/core/modules/block_content/src/Tests/BlockContentCreationTest.php
+++ b/core/modules/block_content/src/Tests/BlockContentCreationTest.php
@@ -21,13 +21,24 @@ class BlockContentCreationTest extends BlockContentTestBase {
   /**
    * Modules to enable.
    *
-   * Enable dummy module that implements hook_block_insert() for exceptions.
+   * Enable dummy module that implements hook_block_insert() for exceptions and
+   * field_ui to edit display settings.
    *
    * @var array
    */
   public static $modules = array('block_content_test', 'dblog', 'field_ui');
 
   /**
+   * Permissions to grant admin user.
+   *
+   * @var array
+   */
+  protected $permissions = array(
+    'administer blocks',
+    'administer block_content display'
+  );
+
+  /**
    * Sets the test up.
    */
   protected function setUp() {
@@ -103,16 +114,36 @@ public function testBlockContentCreationMultipleViewModes() {
     // Check that the view mode setting is shown because more than one exists.
     $this->assertFieldByXPath('//select[@name="settings[view_mode]"]', NULL, 'View mode setting shown because multiple exist');
 
+    // Test the available view mode options.
+    $this->assertOption('edit-settings-view-mode', 'default', 'The default view mode is available.');
+    $this->assertNoOption('edit-settings-view-mode', 'test_view_mode', 'The test view mode is not available.');
     // Change the view mode.
-    $view_mode['settings[view_mode]'] = 'test_view_mode';
+    $view_mode['settings[view_mode]'] = 'default';
     $this->drupalPostForm(NULL, $view_mode, t('Save block'));
 
-    // Go to the configure page and verify that the new view mode is correct.
+    // Set test_view_mode as a custom display to be available on the list.
+    $this->drupalGet('admin/structure/block/block-content');
+    $this->drupalGet('admin/structure/block/block-content/types');
+    $this->clickLink(t('Manage display'));
+    $this->drupalGet('admin/structure/block/block-content/manage/basic/display');
+    $custom_view_mode = array(
+      'display_modes_custom[test_view_mode]' => 1,
+    );
+    $this->drupalPostForm(NULL, $custom_view_mode, t('Save'));
+
+    // Go to the configure page and change the view mode.
     $this->drupalGet('admin/structure/block/manage/testblock');
-    $this->assertFieldByXPath('//select[@name="settings[view_mode]"]/option[@selected="selected"]/@value', 'test_view_mode', 'View mode changed to Test View Mode');
 
     // Test the available view mode options.
     $this->assertOption('edit-settings-view-mode', 'default', 'The default view mode is available.');
+    $this->assertOption('edit-settings-view-mode', 'test_view_mode', 'The test view mode is available.');
+
+    $view_mode['settings[view_mode]'] = 'test_view_mode';
+    $this->drupalPostForm(NULL, $view_mode, t('Save block'));
+
+    // Verify that the new view mode is correct.
+    $this->drupalGet('admin/structure/block/manage/testblock');
+    $this->assertFieldByXPath('//select[@name="settings[view_mode]"]/option[@selected="selected"]/@value', 'test_view_mode', 'View mode changed to Test View Mode');
 
     // Check that the block exists in the database.
     $blocks = entity_load_multiple_by_properties('block_content', array('info' => $edit['info[0][value]']));
diff --git a/core/modules/node/src/Form/NodePreviewForm.php b/core/modules/node/src/Form/NodePreviewForm.php
index 52f0267..a126c9e 100644
--- a/core/modules/node/src/Form/NodePreviewForm.php
+++ b/core/modules/node/src/Form/NodePreviewForm.php
@@ -86,7 +86,11 @@ public function buildForm(array $form, FormStateInterface $form_state, EntityInt
       '#options' => array('attributes' => array('class' => array('node-preview-backlink'))) + $query_options,
     );
 
-    $view_mode_options = $this->getViewModeOptions($node);
+    $view_mode_options = $this->entityManager->getViewModeOptionsByBundle('node', $node->bundle());
+
+    // Unset view modes that are not used in the front end.
+    unset($view_mode_options['rss']);
+    unset($view_mode_options['search_index']);
 
     $form['uuid'] = array(
       '#type' => 'value',
@@ -124,46 +128,4 @@ public function submitForm(array &$form, FormStateInterface $form_state) {
     ));
   }
 
-  /**
-   * Retrieves the list of available view modes for the current node.
-   *
-   * @param EntityInterface $node
-   *   The node being previewed.
-   *
-   * @return array
-   *   List of available view modes for the current node.
-   */
-  protected function getViewModeOptions(EntityInterface $node) {
-    $load_ids = array();
-    $view_mode_options = array();
-
-    // Load all the node's view modes.
-    $view_modes = $this->entityManager->getViewModes('node');
-
-    // Get the list of available view modes for the current node's bundle.
-    $ids = $this->configFactory->listAll('core.entity_view_display.node.' . $node->bundle());
-    foreach ($ids as $id) {
-      $config_id = str_replace('core.entity_view_display' . '.', '', $id);
-      $load_ids[] = $config_id;
-    }
-    $displays = entity_load_multiple('entity_view_display', $load_ids);
-
-    // Generate the display options array.
-    foreach ($displays as $display) {
-
-      $view_mode_name = $display->get('mode');
-
-      // Skip view modes that are not used in the front end.
-      if (in_array($view_mode_name, array('rss', 'search_index'))) {
-        continue;
-      }
-
-      if ($display->status()) {
-        $view_mode_options[$view_mode_name] = ($view_mode_name == 'default') ? t('Default') : $view_modes[$view_mode_name]['label'];
-      }
-    }
-
-    return $view_mode_options;
-  }
-
 }
diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
index 411e670..3f6b2ae 100644
--- a/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
+++ b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php
@@ -128,6 +128,13 @@ class EntityManagerTest extends UnitTestCase {
   protected $eventDispatcher;
 
   /**
+   * The config factory.
+   *
+   * @var \Drupal\Core\Config\ConfigFactoryInterface
+   */
+  protected $configFactory;
+
+  /**
    * {@inheritdoc}
    */
   protected function setUp() {
@@ -177,7 +184,8 @@ protected function setUp() {
     $this->eventDispatcher = $this->getMock('Symfony\Component\EventDispatcher\EventDispatcherInterface');
 
     $this->installedDefinitions = $this->getMock('Drupal\Core\KeyValueStore\KeyValueStoreInterface');
-
+    $this->configFactory = $this->getConfigFactoryStub();
+    
     $this->container = $this->getContainerWithCacheTagsInvalidator($this->cacheTagsInvalidator);
     $this->container = $this->getMock('Symfony\Component\DependencyInjection\ContainerInterface');
     \Drupal::setContainer($this->container);
@@ -232,7 +240,7 @@ protected function setUpEntityManager($definitions = array()) {
       ->method('getDefinitions')
       ->will($this->returnValue($definitions));
 
-    $this->entityManager = new TestEntityManager(new \ArrayObject(), $this->moduleHandler, $this->cacheBackend, $this->languageManager, $this->translationManager, $this->getClassResolverStub(), $this->typedDataManager, $this->installedDefinitions, $this->eventDispatcher);
+    $this->entityManager = new TestEntityManager(new \ArrayObject(), $this->moduleHandler, $this->cacheBackend, $this->languageManager, $this->translationManager, $this->getClassResolverStub(), $this->typedDataManager, $this->installedDefinitions, $this->eventDispatcher, $this->configFactory);
     $this->entityManager->setContainer($this->container);
     $this->entityManager->setDiscovery($this->discovery);
   }
