public static function Check::canCall in Hook Update Deploy Tools 7
Same name and namespace in other branches
- 8 src/Check.php \HookUpdateDeployTools\Check::canCall()
Evaluates if a function can be used.
Parameters
string $function_name: The name of a function.
Return value
bool TRUE if the function can be called.
Throws
HudtException if the function does not exist.
20 calls to Check::canCall()
- Check::isGroup in src/
Check.php - A strict check for entity being a group. Fails update if !group.
- Contexts::canSwitch in src/
Contexts.php - Check availability of modules & methods needed to enable/disable a context.
- Features::revert in src/
Features.php - Safely revert an array of Features and provide feedback.
- Groups::assignUsersToGroup in src/
Groups.php - Add users to an Organic Group.
- Groups::cooptMembers in src/
Groups.php - Add members from one group, to another group.
File
- src/
Check.php, line 28 - File for methods related to strictly checking things.
Class
- Check
- Public methods for dealing with Checking things.
Namespace
HookUpdateDeployToolsCode
public static function canCall($function_name) {
if (!empty($function_name) && function_exists($function_name)) {
return TRUE;
}
else {
$message = "The function '@name' does not exist and can not be used.";
$vars = array(
'@name' => $function_name,
);
throw new HudtException($message, $vars, WATCHDOG_ERROR, TRUE);
}
}