You are here

public function FieldTargetBase::getSummary in Feeds 8.3

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 ConfigurableTargetInterface::getSummary

5 calls to FieldTargetBase::getSummary()
DateTargetBase::getSummary in src/Feeds/Target/DateTargetBase.php
Returns the summary for a target.
Email::getSummary in src/Feeds/Target/Email.php
Returns the summary for a target.
EntityReference::getSummary in src/Feeds/Target/EntityReference.php
Returns the summary for a target.
Password::getSummary in src/Feeds/Target/Password.php
Returns the summary for a target.
Text::getSummary in src/Feeds/Target/Text.php
Returns the summary for a target.
6 methods override FieldTargetBase::getSummary()
ConfigEntityReference::getSummary in src/Feeds/Target/ConfigEntityReference.php
Returns the summary for a target.
DateTargetBase::getSummary in src/Feeds/Target/DateTargetBase.php
Returns the summary for a target.
Email::getSummary in src/Feeds/Target/Email.php
Returns the summary for a target.
EntityReference::getSummary in src/Feeds/Target/EntityReference.php
Returns the summary for a target.
Password::getSummary in src/Feeds/Target/Password.php
Returns the summary for a target.

... See full list

File

src/Plugin/Type/Target/FieldTargetBase.php, line 320

Class

FieldTargetBase
Helper class for field mappers.

Namespace

Drupal\feeds\Plugin\Type\Target

Code

public function getSummary() {
  $summary = [];
  if (!$this
    ->isMutable()) {
    $summary[] = $this
      ->t('Read only');
  }
  if ($this
    ->isTargetTranslatable()) {
    $language = $this
      ->getLanguageManager()
      ->getLanguage($this->configuration['language']);
    if ($language instanceof LanguageInterface) {
      $summary[] = $this
        ->t('Language: @language', [
        '@language' => $language
          ->getName(),
      ]);
    }
  }
  return $summary;
}