class DataViewsBulkOperationsHelper in Data 6
Helper class to provide a functor as callback.
Hierarchy
Expanded class hierarchy of DataViewsBulkOperationsHelper
File
- data_vbo/
data_vbo.module, line 5
View source
class DataViewsBulkOperationsHelper {
var $table_name;
function __construct($table_name) {
$this->table_name = $table_name;
}
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];
}
}