protected function MappingForm::buildSummary in Feeds 8.3
Builds the summary for a configurable target.
Parameters
\Drupal\feeds\Plugin\Type\Target\ConfigurableTargetInterface $plugin: A configurable target plugin.
Return value
array A renderable array.
1 call to MappingForm::buildSummary()
- MappingForm::buildRow in src/
Form/ MappingForm.php - Builds a single mapping row.
File
- src/
Form/ MappingForm.php, line 424
Class
- MappingForm
- Provides a form for mapping settings.
Namespace
Drupal\feeds\FormCode
protected function buildSummary(ConfigurableTargetInterface $plugin) {
// Display a summary of the current plugin settings.
$summary = $plugin
->getSummary();
if (!empty($summary)) {
if (!is_array($summary)) {
$summary = [
$summary,
];
}
return [
'#type' => 'inline_template',
'#template' => '<div class="plugin-summary">{{ summary|safe_join("<br />") }}</div>',
'#context' => [
'summary' => $summary,
],
'#cell_attributes' => [
'class' => [
'plugin-summary-cell',
],
],
];
}
return [];
}