Skip to content

Drupal hooks & Plugins

Marie-Louise edited this page Jan 16, 2019 · 4 revisions

Drupal hooks are functions which are used to extend Drupal or it's core modules. the module needs to implemented for a hook for drupal to be extended.

Drupal comes with a list of hooks pre-prepared hooks to be used.

**Create a custom plugin **

Ctools is a

“Tools to make it easy for modules to let other modules implement plugins from .inc files.”

the plugins are usually kept in here >

`Sites/corporate/www/sites/all/modules/custom/<plugin_name>

Plugin example with guidance

you can find samples of a plugin within the ctools directory:

/Sites/corporate/www/sites/all/modules/contrib/ctools

and then

/Sites/corporate/www/sites/all/modules/contrib/ctools/ctools_plugin_example

and

/Sites/corporate/www/sites/all/modules/contrib/ctools/ctools_plugin_example/plugins

Clone this wiki locally