Hi, It would be nice to to move the #header array to the module scope so we can use something like:

hook_form_search_api_index_fields_alter

eg:

/**
 * Add search_api_glossary settings to Search API Index configuration.
 *
 * Implements hook_form_FORM_ID_alter().
 */
function search_api_glossary_form_search_api_index_fields_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {
.
.
.  
  $form['entity:node']['#header'][] = t('Glossary AZ');
.
.
.
}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dakku created an issue. See original summary.

dakku’s picture

dakku’s picture

Status: Active » Needs review
snufkin’s picture

+1 for this, I agree that the contents of the table header should be part of the data declaration, not the frontend layer.

borisson_’s picture

Status: Needs review » Reviewed & tested by the community

Sure, why not?

  • drunken monkey committed babd37d on 8.x-1.x authored by dakku
    Issue #2708639 by dakku, drunken monkey: Moved the "Fields" table header...
drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Sure, why not?

My thoughts exactly.
Committed (with a bit of reformatting).
Thanks for the patch!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.