You are here

function countdown_ctools_plugin_type in Countdown 7.2

Implements hook_ctools_plugin_type().

Defines the 'countdown' plugin type. This uses file discovery rather than a hook, so implementing modules need to implement hook_ctools_plugin_directory(). The plugin definition should contain:

  • 'label': The human-readable label of the plugin. This is shown in the box admin form.
  • 'description': A longer description of the plugin. This is shown in the box admin form.
  • 'callback': The name of an implementation of callback_countdown_countdown_build(). This returns the render array for the countdown. This may be located in the plugin file.
  • 'supported_options': An array of options this plugin supports. These should match the options defined in countdown_box::options_defaults().

File

./countdown.module, line 67
Count to, or from, a specified date and display the output in a block

Code

function countdown_ctools_plugin_type() {

  // Declare our plugin type.
  $plugins['countdown'] = array(
    // New plugins are only introduced by new modules, so should be cached.
    'cache' => TRUE,
    // We don't use a centralized info hook, just file discovery.
    // @see countdown_ctools_plugin_directory().
    'use hooks' => FALSE,
  );
  return $plugins;
}