Skip to content

Document provided hooks #7

@quicksketch

Description

@quicksketch

While reviewing the changes to project_github.module in backdrop-contrib/project#13, I wanted to know what each parameter was that got passed into hook_githubapi_payload():

 /**
 * Implements hook_githubapi_payload().
 */
function project_github_githubapi_payload($event_name, $record, $repo) {
  ...
}

$record and $repo are mysterious parameters, without proper documentation it can be difficult to figure out what they contain. Typically modules that provide hooks also have a githubapi.api.php file that contains all their documentation. e.g. https://github.com/backdrop-contrib/flag/blob/1.x-1.x/flag.api.php or https://github.com/backdrop-contrib/webform/blob/1.x-1.x/webform.api.php

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions