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.

Issue fork crm-3537888

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lostcarpark created an issue. See original summary.

bluegeek9’s picture

It should be

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

bluegeek9’s picture

Status: Active » Needs review
lostcarpark’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

bluegeek9’s picture

Status: Reviewed & tested by the community » Fixed
//www.flaticon.com/free-icons/thank-you Thank you for your contribution! Your continued support makes this project sustainable.
There are multiple ways to show appreciation for the work contributed to this project including:
  • Triage issues and adding more context to existing issues.
  • Flagging CRM as a favorite on the project page to help others discover it and show your support.

  • bluegeek9 committed 3cb10c10 on 1.0.x
    Issue #3537888 by bluegeek9, lostcarpark: Should "contact_theme" hook be...
fjgarlin’s picture

(Updating to resolve Drupal.org issue index issue, please disregard)

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.