Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Actually the "/admin/structure/taxonomy/manage/{term_name}/overview" page list are really static. With other module like "Form mode manager"we try to add operations to manage Term with differents form_mode but it's really hard (or we need to override and duplicate all code to change this) to add operations because that is hardcoded in \Drupal\taxonomy\Form\OverviewTerms::buildForm line 264. Saddly we build operation list with that code
$operations = array(
'edit' => array(
'title' => $this->t('Edit'),
'query' => $destination,
'url' => $term->urlInfo('edit-form'),
),
'delete' => array(
'title' => $this->t('Delete'),
'query' => $destination,
'url' => $term->urlInfo('delete-form'),
),
);
if ($this->moduleHandler->moduleExists('content_translation') && content_translation_translate_access($term)->isAllowed()) {
$operations['translate'] = array(
'title' => $this->t('Translate'),
'query' => $destination,
'url' => $term->urlInfo('drupal:content-translation-overview'),
);
}
$form['terms'][$key]['operations'] = array(
'#type' => 'operations',
'#links' => $operations,
);
Proposed resolution
I purpose to change it with an more flexible / standard views like this issue #1823450: [Meta] Convert core listings to Views
Comments
Comment #2
woprrr CreditAttribution: woprrr as a volunteer commentedComment #3
woprrr CreditAttribution: woprrr as a volunteer commentedOops duplicate of #2704387: hook_entity_operation() and hook_entity_operation_alter() are not invoked for Taxonomy term