function ctools_plugin_process_info in Chaos Tool Suite (ctools) 7
Same name and namespace in other branches
- 6 includes/plugins.inc \ctools_plugin_process_info()
Process an info file for plugin information, rather than a hook.
Parameters
array $info: The $info array about the plugin as returned by ctools_plugin_get_info()
string $module: The module that implements the plugin being processed.
object $file: An object containing 'uri' and 'name' properties. 'uri' is the name of the 'info' file to process. 'name' is the plugin key-name.
Return value
null|array NULL on failure, otherwise an array containing the results keyed by name.
1 call to ctools_plugin_process_info()
- ctools_plugin_load_includes in includes/
plugins.inc - Load plugins from a directory.
File
- includes/
plugins.inc, line 761 - Contains routines to organize and load plugins. It allows a special variation of the hook system so that plugins can be kept in separate .inc files, and can be either loaded all at once or loaded only when necessary.
Code
function ctools_plugin_process_info($info, $module, $file) {
$result = drupal_parse_info_file($file->uri);
if ($result) {
$result = array(
$file->name => $result,
);
return _ctools_process_data($result, $info, $module, dirname($file->uri), basename($file->uri));
}
}