public function ViewsIfEmpty::adminSummary in Views If Empty 8
Provide extra data to the administration form
Overrides FieldPluginBase::adminSummary
File
- src/
Plugin/ views/ field/ ViewsIfEmpty.php, line 117 - Contains \Drupal\views_ifempty\Plugin\views\field\ViewsIfEmpty.
Class
- ViewsIfEmpty
- Field handler to output an alternate field when a field is empty.
Namespace
Drupal\views_ifempty\Plugin\views\fieldCode
public function adminSummary() {
if (!empty($this->options['emptyfield']) && !empty($this->options['outputfield'])) {
return $this
->t('If @emptyfield !is empty, output @outputfield', array(
'@emptyfield' => $this->options['emptyfield'],
'!is' => $this->options['reverse'] ? t('is not') : t('is'),
'@outputfield' => $this->options['outputfield'],
));
}
else {
return $this
->t('Invalid field selection');
}
}