flaggings fieldable, not the flags.
* (In the same way that Drupal makes nodes fieldable, not node
* types).
*/
/**
* Controller class for flaggings.
*/
class FlaggingController extends DrupalDefaultEntityController {
protected function buildQuery($ids, $conditions = array(), $revision_id = FALSE) {
$query = parent::buildQuery($ids, $conditions, $revision_id);
// Add the flag name, which determines the bundle.
$query->innerJoin('flag', 'flag', 'base.fid = flag.fid');
$query->addField('flag', 'name', 'flag_name');
return $query;
}
}