You are here

public function Color::getSummary in Color Field 8.2

Returns the summary for a target.

Returning the summary as array is encouraged. The allowance of returning a string only exists for backwards compatibility.

Return value

string|string[] The configuration summary.

Overrides FieldTargetBase::getSummary

File

src/Feeds/Target/Color.php, line 92

Class

Color
Defines a color field mapper.

Namespace

Drupal\color_field\Feeds\Target

Code

public function getSummary() {
  $summary = parent::getSummary();
  $summary[] = $this->configuration['format'] ? $summary[] = $this
    ->t('Color with format: %format', [
    '%format' => $this->configuration['format'],
  ]) : $this
    ->t('Color by default');
  return $summary;
}