public function ConfigEntityReference::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 FieldTargetBase::getSummary
1 call to ConfigEntityReference::getSummary()
- UserRole::getSummary in src/
Feeds/ Target/ UserRole.php - Returns the summary for a target.
1 method overrides ConfigEntityReference::getSummary()
- UserRole::getSummary in src/
Feeds/ Target/ UserRole.php - Returns the summary for a target.
File
- src/
Feeds/ Target/ ConfigEntityReference.php, line 307
Class
- ConfigEntityReference
- Defines a config entity reference mapper.
Namespace
Drupal\feeds\Feeds\TargetCode
public function getSummary() {
$options = $this
->getPotentialFields();
$summary = [];
if ($this->configuration['reference_by'] && isset($options[$this->configuration['reference_by']])) {
$summary[] = $this
->t('Reference by: %message', [
'%message' => $options[$this->configuration['reference_by']],
]);
}
else {
$summary[] = $this
->t('Please select a field to reference by.');
}
return $summary;
}