You are here

public function Robohash::settingsSummary in Avatar Kit 8

Generate a summary about the current configuration of the widget.

Return value

array A render array.

Overrides AvatarGeneratorBase::settingsSummary

File

avatars_robohash/src/Plugin/AvatarGenerator/Robohash.php, line 103

Class

Robohash
Robohash avatar generator.

Namespace

Drupal\avatars_robohash\Plugin\AvatarGenerator

Code

public function settingsSummary() {
  $summary = [];
  if (empty($this->configuration['type']) || empty($this->configuration['background'])) {
    $summary[] = $this
      ->t('Missing Configuration');
  }
  else {
    $summary[]['#markup'] = $this
      ->t('Type: @type | Background: @background', [
      '@type' => $this->configuration['type'],
      '@background' => $this->configuration['background'],
    ]);
  }
  return $summary;
}