Move hook out of .module file
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3531836. -->
Reported by: [rachel_norfolk](https://www.drupal.org/user/66273)
Related to !3
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>I wrote this quickly to demonstrate the concept in a traditional hook function in the .module file but things move on, as they do, and we can now do hooks in classes.</p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>n/a</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Create a class file that implements the hook according to <a href="https://www.drupal.org/node/3442349">https://www.drupal.org/node/3442349</a> and then remove the .module completely.<br>
We definitely want to support Drupal 10.1 upwards so include the shim at "Backwards-compatible Hook implementation for Drupal versions from 10.1 to 11.0"</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<p>Create the MR</p>
<h3 id="summary-ui-changes">User interface changes</h3>
<p>none</p>
<h3 id="summary-api-changes">API changes</h3>
<p>none</p>
<h3 id="summary-data-model-changes">Data model changes</h3>
<p>none</p>
issue