You are here

function views_bulk_operations_plugin_style::get_operations_options in Views Bulk Operations (VBO) 6

Same name and namespace in other branches
  1. 6.3 views_bulk_operations_plugin_style.inc \views_bulk_operations_plugin_style::get_operations_options()
1 call to views_bulk_operations_plugin_style::get_operations_options()
views_bulk_operations_plugin_style::options_form in ./views_bulk_operations_plugin_style.inc
Implementation of views_plugin::options_form().

File

./views_bulk_operations_plugin_style.inc, line 278

Class

views_bulk_operations_plugin_style

Code

function get_operations_options() {
  static $options = array();
  if (empty($options)) {
    $object_info = _views_bulk_operations_object_info_for_view($this->view);
    if (!$object_info) {
      return $options;
    }
    foreach ($this->all_operations as $key => $operation) {
      if ($operation['type'] == $object_info['type'] || $operation['type'] == 'system' || in_array($object_info['hook'], (array) $operation['hooks'])) {
        $options[$key] = $operation['label'] . ' (' . $key . ')';
      }
    }
  }
  return $options;
}