How can I find the 'base hook' to override a template file using a custom module?
'node' and 'user' are pretty straightforward, but others can be a little more elusive.
Example code...
MYMODULE.module:
/**
** Implements hook_theme().
**/
function MYMODULE_theme($existing, $type, $theme, $path) {
return [
'username' => [
'template' => 'username',
'base hook' => 'how do you get this?',
],
];
}
template
if the template is named the same as the theme.