You are here

function cache_actions_action_clear_cache_form in Cache Actions 6

Same name and namespace in other branches
  1. 6.2 cache_actions.rules.inc \cache_actions_action_clear_cache_form()

Action drupal message configuration form.

File

./cache_actions.rules.inc, line 165
This file provides the rules integration for this module. @author Fabian Sörqvist <fabian.sorqvist@gmail.com>

Code

function cache_actions_action_clear_cache_form($settings, &$form) {
  $settings += array(
    'tables' => '',
  );
  $cache_bins = array(
    'cache' => 'cache',
    'cache_block' => 'cache_block',
    'cache_filter' => 'cache_filter',
    'cache_page' => 'cache_page',
  );
  foreach (module_invoke_all('flush_caches') as $cache_bin) {
    $cache_bins[$cache_bin] = $cache_bin;
  }
  $form['settings']['tables'] = array(
    '#type' => 'select',
    '#title' => t('Cache bins'),
    '#multiple' => TRUE,
    '#options' => $cache_bins,
    '#default_value' => $settings['tables'],
    '#description' => t('The cache bins to be cleared.'),
  );
}