You are here

function autofill_field_widget_settings_summary_alter in Autofill 8

Implements hook_field_widget_settings_summary_alter().

File

./autofill.module, line 74
Contains autofill.module.

Code

function autofill_field_widget_settings_summary_alter(array &$summary, array $context) {

  /** @var \Drupal\Core\Field\WidgetInterface $widget */
  $widget = $context['widget'];
  if ($widget
    ->getThirdPartySetting('autofill', 'enabled') && ($source_field = $widget
    ->getThirdPartySetting('autofill', 'source_field'))) {
    $summary[] = t('Autofill from: @source_field', [
      '@source_field' => $source_field,
    ]);
  }
}