function patterns_api_is_valid_component_name in Patterns 7
Same name and namespace in other branches
- 7.2 includes/api/api.inc \patterns_api_is_valid_component_name()
Checks whether a string is an existing component name.
Parameters
mixed $component: The string with the name of the component
Return value
Boolean TRUE, if the string is a valid component name
See also
patterns_api_build_moduletags_index()
File
- includes/
api/ api.inc, line 56 - API for writing pattern files.
Code
function patterns_api_is_valid_component_name($component = NULL) {
if (is_null($component)) {
return FALSE;
}
$idx = patterns_moduletags_get_index();
return isset($idx[$component]) ? TRUE : FALSE;
}