You are here

public function UserMail::settingsSummary in Display Suite 8.4

Same name and namespace in other branches
  1. 8.3 src/Plugin/DsField/User/UserMail.php \Drupal\ds\Plugin\DsField\User\UserMail::settingsSummary()

Returns the summary of the chosen settings.

Parameters

array $settings: Contains the settings of the field.

Return value

array A render array containing the summary.

Overrides DsFieldBase::settingsSummary

File

src/Plugin/DsField/User/UserMail.php, line 45

Class

UserMail
Plugin that renders the username.

Namespace

Drupal\ds\Plugin\DsField\User

Code

public function settingsSummary($settings) {
  $config = $this
    ->getConfiguration();
  $summary = [];
  if (!empty($config['mail_link'])) {
    $summary[] = 'Link to mail: yes';
  }
  else {
    $summary[] = 'Link to mail: no';
  }
  return $summary;
}