I'm trying to override the User entity list_builder handler to add another column to the table and implement some JavaScript search functionality.
The code I'm using is below which is in my modules mm.module file.
function mm_user_override_entity_type_alter(array &$entity_types) {
$entity_types['user']->setHandlerClass('list_builder', 'Drupal\mm_user_list_builder\UserListBuilder');
}
The issue I'm having is this code gives me the following error
Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException</em>: The "user" entity type did not specify a list_builder handler.
Which from what I can tell is not correct, even $entity_types['user']->getHandlerClasses()
tells me the list_builder
handler exists.
Why is this error happening & how best to resolve it? Or is there a better way for me to add a column & search to the user list page?