You are here

public function MediaTarget::getSummary in Media Feeds 8

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

File

src/Feeds/Target/MediaTarget.php, line 409

Class

MediaTarget
Defines a wrapper target around a paragraph bundle's target field.

Namespace

Drupal\media_feeds\Feeds\Target

Code

public function getSummary() {
  if ($this->isMedia) {
    $sum = null;
    if ($this->targetInstance instanceof ConfigurableTargetInterface) {
      $sum = $this->targetInstance
        ->getSummary();
    }
    return $sum;
  }
  else {
    return parent::getSummary();
  }
}