1 entityreference.module _entityreference_preprocess_set_title_display(&$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:

File

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

Code

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