alterSettingsSummary example


    else {
      $field_row['settings_summary'] = [];
      $field_row['settings_edit'] = [];

      if ($plugin) {
        // Display a summary of the current plugin settings, and (if the         // summary is not empty) a button to edit them.         $summary = $plugin->settingsSummary();

        // Allow other modules to alter the summary.         $this->alterSettingsSummary($summary$plugin$field_definition);

        if (!empty($summary)) {
          $field_row['settings_summary'] = [
            '#type' => 'inline_template',
            '#template' => '<div class="field-plugin-summary">{{ summary|safe_join("<br />") }}</div>',
            '#context' => ['summary' => $summary],
            '#cell_attributes' => ['class' => ['field-plugin-summary-cell']],
          ];
        }

        // Check selected plugin settings to display edit link or not.
Home | Imprint | This part of the site doesn't use cookies.