Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 
  • Adds rdf_entity_prepare_view() - loops over each defined rdf mapping for the entity in question, adding rdf data to the $item->_attributes property.
  • Adds $item->_attributes property to field items.
  • Removes rdf_preprocess_field() and rdf_field_attach_view_alter()
  • As hook_entity_prepare_view() runs prior to markup being generated by field formatters, field formatters now have the option of using rdf attributes rather than having to wrap fields with rdf markup in template files.
  • In the case that the field formatter does not do anything with the rdf _attributes passed to it, they will be added to fields in the same way they were in Drupal 7.

Drupal 8: Example of a field formatter using the item attributes directly in its output:

// Pass field item attributes to the theme function.
if (isset($item->_attributes)) {
  $elements[$delta] += array('#attributes' => array());
  $elements[$delta]['#attributes'] += $item->_attributes;
  // Unset field item attributes since they have been included in the
  // formatter output and should not be rendered in the field template.
  unset($item->_attributes);
}
Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done