function _cacheflush_advanced_table_row in CacheFlush 7.3
Same name and namespace in other branches
- 8 modules/cacheflush_advanced/cacheflush_advanced.module \_cacheflush_advanced_table_row()
- 7 cacheflush_advanced/cacheflush_advanced.module \_cacheflush_advanced_table_row()
- 7.2 cacheflush_advanced/cacheflush_advanced.module \_cacheflush_advanced_table_row()
Build cacheflush custom settings row form elements.
Parameters
int $delta: Row weight.
string $cid: Cache ID.
string $table: Table id to be flushed.
bool $wildcard: Wildcard checkbox value.
Return value
string Advanced table row.
1 call to _cacheflush_advanced_table_row()
- cacheflush_advanced_form_cacheflush_form_alter in modules/
cacheflush_advanced/ cacheflush_advanced.module - Implements hook_form_FORM_ID_alter().
File
- modules/
cacheflush_advanced/ cacheflush_advanced.module, line 210 - Cacheflush advanced preset form.
Code
function _cacheflush_advanced_table_row($delta, $cid = '', $table = '', $wildcard = FALSE) {
static $table_options;
if (empty($table_options)) {
$cache_tables = cacheflush_get_all_tabels();
asort($cache_tables);
$table_options = array_combine($cache_tables, $cache_tables);
array_unshift($table_options, t("- Select a table -"));
}
$form['cid'] = array(
'#type' => 'textfield',
'#default_value' => $cid,
'#size' => 20,
);
$form['table'] = array(
'#type' => 'select',
'#default_value' => $table,
'#options' => $table_options,
);
$form['wildcard'] = array(
'#title' => t('TRUE'),
'#type' => 'checkbox',
'#default_value' => $wildcard,
);
$form['operations'] = array(
'#name' => 'advanced_remove_' . $delta,
'#type' => 'button',
'#value' => t('Remove'),
'#ajax' => array(
'callback' => '_cacheflush_advanced_form_callback',
'wrapper' => 'cacheflush-advanced-settings-table',
'method' => 'replace',
'effect' => 'fade',
),
);
return $form;
}