public function HideOnPages::summary in Field Formatter Condition 8
Return the summary string.
Parameters
array $settings: The current settings array.
Overrides FieldFormatterConditionBase::summary
File
- src/
Plugin/ Field/ FieldFormatter/ Condition/ HideOnPages.php, line 61
Class
- HideOnPages
- The plugin for check empty fields.
Namespace
Drupal\fico\Plugin\Field\FieldFormatter\ConditionCode
public function summary($settings) {
$pages = explode("\n", $settings['settings']['pages']);
return t("Condition: %condition - %visibility (%settings)", [
"%condition" => t('Hide on specific pages'),
"%visibility" => $settings['settings']['visibility'] == 1 ? t('Only the listed pages') : t('All pages except those listed'),
"%settings" => implode(', ', $pages),
]);
}