You are here

function views_bulk_operations_plugin_style::get_access_op 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_access_op()
1 call to views_bulk_operations_plugin_style::get_access_op()
views_bulk_operations_plugin_style::populate_operations in ./views_bulk_operations_plugin_style.inc

File

./views_bulk_operations_plugin_style.inc, line 344

Class

views_bulk_operations_plugin_style

Code

function get_access_op($operation) {
  $access_op = 0;
  if (isset($operation['behavior'])) {
    if (in_array('views_node_property', $operation['behavior'])) {
      $access_op |= VBO_ACCESS_OP_VIEW;
    }
    if (in_array('changes_node_property', $operation['behavior'])) {
      $access_op |= VBO_ACCESS_OP_UPDATE;
    }
    if (in_array('creates_node_property', $operation['behavior'])) {
      $access_op |= VBO_ACCESS_OP_CREATE;
    }
    if (in_array('deletes_node_property', $operation['behavior'])) {
      $access_op |= VBO_ACCESS_OP_DELETE;
    }
  }
  return $access_op;
}