commit cb9628f5df95a8ba8ef4066c3f2cd38f82500005 Author: Wolfgang Ziegler // fago Date: Thu Dec 12 16:34:12 2013 +0100 Fixed merge problems. diff --git a/core/modules/field/field.deprecated.inc b/core/modules/field/field.deprecated.inc index a27ed79..9698106 100644 --- a/core/modules/field/field.deprecated.inc +++ b/core/modules/field/field.deprecated.inc @@ -735,11 +735,7 @@ function field_attach_prepare_view($entity_type, array $entities, array $display * @deprecated as of Drupal 8.0. Use the entity system instead. */ function field_attach_view(EntityInterface $entity, EntityViewDisplayInterface $display, $langcode = NULL, array $options = array()) { - // Determine the actual language code to display for each field, given the - // language codes available in the field data. - $options['langcode'] = field_language($entity, NULL, $langcode); - - // For each instance, call the view() method on the formatter object handed + // For each field, call the view() method on the formatter object handed // by the entity display. $target_function = function (FieldDefinitionInterface $field_definition) use ($display) { return $display->getRenderer($field_definition->getName()); diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 7396e4a..a850c8a 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -193,12 +193,14 @@ function node_entity_bundle_info() { * Implements hook_entity_display_alter(). */ function node_entity_display_alter(EntityViewDisplayInterface $display, $context) { - // Hide field labels in search index. - if ($context['entity_type'] == 'node' && $context['view_mode'] == 'search_index') { - foreach ($display->getComponents() as $name => $options) { - if (isset($options['label'])) { - $options['label'] = 'hidden'; - $display->setComponent($name, $options); + if ($context['entity_type'] == 'node') { + // Hide field labels in search index. + if ($context['view_mode'] == 'search_index') { + foreach ($display->getComponents() as $name => $options) { + if (isset($options['label'])) { + $options['label'] = 'hidden'; + $display->setComponent($name, $options); + } } } // @todo Manage base field displays in the YAML: diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module index 9e24022..a5fad17 100644 --- a/core/modules/statistics/statistics.module +++ b/core/modules/statistics/statistics.module @@ -79,17 +79,6 @@ function statistics_node_links_alter(array &$node_links, NodeInterface $entity, } /** - * Implements hook_node_view_alter(). - */ -function statistics_node_view_alter(&$build, EntityInterface $node, EntityViewDisplayInterface $display) { - // If statistics were added to the node render array, we can't use the render - // cache. - if (isset($build['links']['statistics'])) { - unset($build['#cache']); - } -} - -/** * Implements hook_menu(). */ function statistics_menu() {