Same name and namespace in other branches
- 8.x-1.x src/Plugin/Field/FieldFormatter/EntityReferenceAjaxFormatter.php \Drupal\entity_reference_ajax_formatter\Plugin\Field\FieldFormatter\EntityReferenceAjaxFormatter::settingsSummary() 1 comment
File
-
src/
Plugin/ Field/ FieldFormatter/ EntityReferenceAjaxFormatter.php, line 155
Class
- EntityReferenceAjaxFormatter
- Plugin implementation of the 'entity reference rendered entity' formatter.
Namespace
Drupal\entity_reference_ajax_formatter\Plugin\Field\FieldFormatterCode
public function settingsSummary() {
$summary = parent::settingsSummary();
$summary[] = $this->t('Loading %items', [
'%items' => $this->getSetting('number'),
]);
if ($this->getSetting('sort')) {
$summary[] = $this->t('Sort: %sort', [
'%sort' => [
$this->t('Field Default Order'),
$this->t('Random'),
$this->t('Date Modified (ascending)'),
$this->t('Date Modified (descending)'),
$this->t('Date Created (ascending)'),
$this->t('Date Created (descending)'),
][$this->getSetting('sort')],
]);
}
if ($this->getSetting('load_more')) {
$summary[] = $this->t('Load more button enabled');
if ($this->getSetting('max')) {
$summary[] = $this->t('Maximum entities to load: %max', [
'%max' => $this->getSetting('max'),
]);
}
}
return $summary;
}