function views_node_selector_process in Views Bulk Operations (VBO) 6.3
Same name and namespace in other branches
- 6 views_bulk_operations.module \views_node_selector_process()
Process the views_node_selector element defined earlier.
See also
views_bulk_operations_elements()
1 string reference to 'views_node_selector_process'
- views_bulk_operations_elements in ./
views_bulk_operations.module - Implementation of hook_elements().
File
- ./
views_bulk_operations.module, line 56 - Allows operations to be performed on items selected in a view.
Code
function views_node_selector_process($element, $edit) {
$element['#tree'] = TRUE;
if (!isset($element['#value'])) {
$element['#value'] = array(
'selection' => array(),
'select_all' => FALSE,
);
}
$view = $element['#view'];
$options = array();
foreach ($view->result as $num => $object) {
$options[$num + 1] = '';
}
$element['selection']['#options'] = $options;
$element['selection']['#value'] = $element['#value']['selection'];
$element['selection']['#attributes'] = array();
$element['selection'] = expand_checkboxes($element['selection']);
$element['select_all'] = array(
'#type' => 'hidden',
'#default_value' => $element['#value']['select_all'],
);
return $element;
}