public static function Check::canCall in Hook Update Deploy Tools 8
Same name and namespace in other branches
- 7 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.
10 calls to Check::canCall()
- Features::revert in src/
Features.php - Safely revert an array of Features and provide feedback.
- Menus::canImport in src/
Menus.php - Checks to see if menu_import in enabled.
- PageManager::canExport in src/
PageManager.php - Checks to see if Panels pages can be exported.
- PageManager::canImport in src/
PageManager.php - Checks if Page Manager is enabled and import functions are available.
- Paths::getAliasObject in src/
Paths.php - Build and get the $alias object to be passed around.
File
- src/
Check.php, line 24
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);
}
}