You are here

function DataViewsBulkOperationsHelper::load in Data 6

File

data_vbo/data_vbo.module, line 10

Class

DataViewsBulkOperationsHelper
Helper class to provide a functor as callback.

Code

function load($oid) {
  $handler = data_get_handler($this->table_name);
  if (!$handler) {
    return NULL;
  }
  $table = data_get_table($this->table_name);
  if (!$table) {
    return NULL;
  }
  $schema = $table
    ->get('table_schema');
  $objects = $handler
    ->load(array(
    $schema['primary key'][0] => $oid,
  ));
  return (object) $objects[0];
}