Skip to content

drupal-hook-implement not quite right #2

@dncohen

Description

@dncohen

Run drupal-hook-implement and pass it hook_menu. It will insert several functions, none of which is hook_menu(). It seems to grab code from the comments on http://api.drupal.org/api/drupal/modules%21system%21system.api.php/function/hook_menu/7, rather than the example implementation.

I wonder would it be better to grab hook code from system.api.php? Or from modules/examples? If it looked for files in the local drupal tree, it might more easily support Drupal 6.x, 7.x and 8.x at the same time.

When I first used drupal-hook-implement, I was typing "menu" at the prompt. Took me a while to realize it needed "hook_menu".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions