Created
March 16, 2019 08:21
-
-
Save msankhala/d9fecd6d714458b1b567151a5d738bc8 to your computer and use it in GitHub Desktop.
create custom info hook.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Drupal 7 implement your custom hook_info() | |
/** | |
* Gets information about a authentication module. | |
* | |
* @param string $module | |
* The module to get info for. | |
* @return mixed | |
* The information array, or FALSE if the information wasn't found. | |
*/ | |
function services_authentication_info($module) { | |
$info = FALSE; | |
if (!empty($module) && module_exists($module) && is_callable($module . '_services_authentication_info')) { | |
$info = call_user_func($module . '_services_authentication_info'); | |
} | |
return $info; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment