1 entityreference.module _entityreference_preprocess_set_title_display(array &$variables)

Pass title display setting to templates.

If #page is set in the rendered entity reference display mode then pass it to the template.

Parameters

array $variables: Render variables passed by reference.

File

core/modules/entityreference/entityreference.module, line 1642
Entityreference primary module file.

Code

function _entityreference_preprocess_set_title_display(array &$variables) {
  if (!strstr($variables['theme_hook_original'], 'entityreference')) {
    return;
  }
  if (isset($variables['elements']['#page']) && $variables['elements']['#page'] !== NULL) {
    $variables['page'] = $variables['elements']['#page'];
  }
}