Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Coming from #1111254: Document the Hostmaster API, I'd like help in documenting hook_post_hosting_TASK_TYPE_task. It looks like it's implemented pretty frequently, but most often in hosting_site.drush.inc.
The function signatures seem pretty consistent: HOOK_post_hosting_TASK_TYPE_task($task, $data). From the hook definition in drush_hosting_post_hosting_task:
- $task appears to be... a reference (?) to drush_get_context('HOSTING_TASK') ; and
- $data seems to be drush_get_context('HOSTING_DRUSH_OUTPUT')
I haven't yet found where the constants HOSTING_TASK and HOSTING_DRUSH_OUTPUT are set yet, though...
Comments
Comment #1
Steven Jones CreditAttribution: Steven Jones commentedLack of docs is a bug
Comment #2
Steven Jones CreditAttribution: Steven Jones commentedI've had a stab at adding some documentation for this in the dev-documentation branch.
Comment #3
Steven Jones CreditAttribution: Steven Jones commentedhook_hosting_TASK_TYPE_task_rollback
can be basically documented in the same way.Comment #4
anarcat CreditAttribution: anarcat commentedIt is an issue, but i'd rather file those as tasks if you don't mind. i wouldn't block a release on docs, and we often go through the whole "list of bugs" before a release.
Comment #5
ergonlogicIn #1206414: Refactor to use proper Provision Drush hooks I quote Anarcat thusly:
It may be worth noting this in the docs, and pointing to Drush hooks (such as
post_provision_verify()
orpost_provision_install()
) as a more appropriate method to hook one's own code into the backend.Comment #6
Steven Jones CreditAttribution: Steven Jones commentedI've beefed the documentation up a little in 6.x-2.x, we can raise further, specific issues in follow up issues.