CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Documentation, Book and Training Resources (Moderator: Michał Mach) »
  • Updating documentation on civicrm_apiWrappers
Pages: [1]

Author Topic: Updating documentation on civicrm_apiWrappers  (Read 880 times)

eyeonall

  • I’m new here
  • *
  • Posts: 1
  • Karma: 0
  • CiviCRM version: 4.4.3
  • CMS version: Drupal 7.x
  • MySQL version: 5.1.67
  • PHP version: 5.4
Updating documentation on civicrm_apiWrappers
February 25, 2014, 08:31:11 am
First, I would like to say I have been waiting for an apiWrappers type of hook. Thanks!

I saw the topic about updating the wiki and have registered. However, I do not want to overstep. Before I go about adding I figured I would ask.

I know the hook reference is for developers but there are a few updates that would make things clearer. First, the Definition reads:

function hook_apiWrappers(&$wrappers, $apiRequest)

Would make things clearer is it read: function hook_civicrm_apiWrappers(&$apiWrappers, $apiRequest)

Adding _civicrm_ because that is necessary for recognizing the hook in the extension. Changing $wrappers to $apiWrappers would match the example given below the function definition since it uses $apiWrappers, as opposed to $wrappers.

Also, perhaps add something like:
$apiAction = strtolower($apiRequest['action']);

before the evaluation in the example since the action can be passed to the URL in all caps and evaluate $apiAction instead of $apiRequest['action'].

Thanks in advance,
A.J.

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Discussion (deprecated) »
  • Documentation, Book and Training Resources (Moderator: Michał Mach) »
  • Updating documentation on civicrm_apiWrappers

This forum was archived on 2017-11-26.