| [ Index ] |
PHP Cross Reference of Drupal 6 (yi-drupal) |
[Source view] [Print] [Project Stats]
(no description)
| File Size: | 100 lines (4 kb) |
| Included or required: | 0 times |
| Referenced: | 0 times |
| Includes or requires: | 0 files |
| hook_ctools_plugin_directory($owner, $plugin_type) X-Ref |
| This hook is used to inform the CTools plugin system about the location of a directory that should be searched for files containing plugins of a particular type. CTools invokes this same hook for all plugins, using the two passed parameters to indicate the specific type of plugin for which it is searching. The $plugin_type parameter is self-explanatory - it is the string name of the plugin type (e.g., Panels' 'layouts' or 'styles'). The $owner parameter is necessary because CTools internally namespaces plugins by the module that owns them. This is an extension of Drupal best practices on avoiding global namespace pollution by prepending your module name to all its functions. Consequently, it is possible for two different modules to create a plugin type with exactly the same name and have them operate in harmony. In fact, this system renders it impossible for modules to encroach on other modules' plugin namespaces. Given this namespacing, it is important that implementations of this hook check BOTH the $owner and $plugin_type parameters before returning a path. If your module does not implement plugins for the requested module/plugin combination, it is safe to return nothing at all (or NULL). As a convenience, it is also safe to return a path that does not exist for plugins your module does not implement - see form 2 for a use case. Note that modules implementing a plugin also must implement this hook to instruct CTools as to the location of the plugins. See form 3 for a use case. The conventional structure to return is "plugins/$plugin_type" - that is, a 'plugins' subdirectory in your main module directory, with individual directories contained therein named for the plugin type they contain. param: string $owner param: string $plugin_type return: string |
| hook_ctools_math_expression_functions_alter(&$functions) X-Ref |
| Alter the available functions to be used in ctools math expression api. One usecase would be to create your own function in your module and allow to use it in the math expression api. param: $functions |
| Generated: Mon Jul 9 18:01:44 2012 | Cross-referenced by PHPXref 0.7 |