efq_views_handler_field_operations.inc in EntityFieldQuery Views Backend 7
File
handlers/efq_views_handler_field_operations.inc
View source
<?php
if (class_exists('views_bulk_operations_handler_field_operations')) {
class efq_views_handler_field_operations extends views_bulk_operations_handler_field_operations {
public function get_entity_type() {
if (substr($this->view->base_table, 0, 4) === 'efq_') {
return substr($this->view->base_table, 4);
}
else {
return parent::get_entity_type();
}
}
public function get_value($row, $field = NULL) {
$entity_type = $this
->get_entity_type();
$ids = entity_extract_ids($entity_type, $row);
if (isset($ids[0]) && !empty($ids[0])) {
return $ids[0];
}
else {
return parent::get_value($row, $field);
}
}
}
}