public function EntityReferenceEntityFormatter::settingsSummary in Entity reference 8
Implements Drupal\field\Plugin\Type\Formatter\FormatterInterface::settingsForm().
File
- lib/
Drupal/ entityreference/ Plugin/ field/ formatter/ EntityReferenceEntityFormatter.php, line 68 - Definition of Drupal\entityreference\Plugin\field\formatter\EntityReferenceEntityFormatter.
Class
- EntityReferenceEntityFormatter
- Plugin implementation of the 'entity-reference rendered entity' formatter.
Namespace
Drupal\entityreference\Plugin\field\formatterCode
public function settingsSummary() {
$summary = array();
$entity_info = entity_get_info($this->field['settings']['target_type']);
$view_mode = $this
->getSetting('view_mode');
$summary[] = t('Rendered as @mode', array(
'@mode' => isset($entity_info['view modes'][$view_mode]['label']) ? $entity_info['view modes'][$view_mode]['label'] : $view_mode,
));
$summary[] = $this
->getSetting('links') ? t('Display links') : t('Do not display links');
return implode('<br />', $summary);
}