Should "contact_theme" hook be "theme" hook?

Created on 24 July 2025, 10 days ago

Problem/Motivation

When converting hooks from procedural to object oriented, I converted the function:

/**
 * Implements hook_theme().
 */
function crm_contact_theme() {

to:

  /**
   * Implements hook_theme().
   */
  #[Hook('contact_theme')]
  public function contactTheme() {

@nicxvan has suggested that this should be using hook_theme.

I think the original hook would only get called if there is a crm_contact module

Proposed resolution

First determine if this hook is needed, since the original procedural hook was not getting called.

If required, implement as hook_theme.

If not required, delete from codebase.

Remaining tasks

Reimplement if required.

User interface changes

None.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇮🇪Ireland lostcarpark

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024