Skip to content
This repository has been archived by the owner on Sep 10, 2021. It is now read-only.

Commit

Permalink
Fix legacy API help page
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie Snape committed Oct 28, 2015
1 parent fec6bda commit 8a875b5
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion modules/api/library/APIEnabledNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,20 @@
*/
class ApiEnabled_Notification extends MIDAS_Notification
{
/** @var string */
public $moduleName = 'api';

/** @var array */
public $_moduleComponents = array('Api');

/**
* This function is for getting the web API methods defined in the API
* component of the implementing class. To enable this add the following
* line to your init function.
*
* $this->enableWebAPI();
*
* @return array
*/
public function getWebApiHelp()
{
Expand Down Expand Up @@ -81,7 +89,11 @@ public function getWebApiHelp()

/**
* Returns the actual method in your module corresponding to the requested method,
* or false if the method doesn't exist.
* or false if the method does not exist.
*
* @param array $params parameters
*
* @return false|array
*/
public function findWebApiMethod($params)
{
Expand All @@ -97,6 +109,8 @@ public function findWebApiMethod($params)
/**
* Add to your init function to enable the web api for your module. This will
* work provided you've created an ApiComponent.
*
* @param string $moduleName module name
*/
public function enableWebAPI($moduleName)
{
Expand Down

0 comments on commit 8a875b5

Please sign in to comment.