function scald_views_handler_filter_actions::value_submit in Scald: Media Management made easy 6
Overrides value_submit: translate the checkboxes to a bitmask.
File
- includes/
scald_views_handler_filter_actions.inc, line 46 - Provides a Views filter handler allowing to restrict the results to atoms the user can interact with.
Class
- scald_views_handler_filter_actions
- @file Provides a Views filter handler allowing to restrict the results to atoms the user can interact with.
Code
function value_submit(&$form, &$form_state) {
$config = variable_get('scald_config', 0);
$mask = 0;
foreach ($form_state['values']['options']['value'] as $value) {
if (!empty($value)) {
$mask += $config->actions[$value]['mask'];
}
}
$form_state['values']['options']['value'] = $mask;
}