1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
/**
|
4 |
|
|
* @file
|
5 |
|
|
* Provides supporting code for the entity/fields system.
|
6 |
|
|
*
|
7 |
|
|
* Note: We're making the <em>flaggings</em> fieldable, not the <em>flags</em>.
|
8 |
|
|
* (In the same way that Drupal makes <em>nodes</em> fieldable, not <em>node
|
9 |
|
|
* types</em>).
|
10 |
|
|
*/
|
11 |
|
|
|
12 |
|
|
/**
|
13 |
|
|
* Controller class for flaggings.
|
14 |
|
|
*/
|
15 |
|
|
class FlaggingController extends DrupalDefaultEntityController {
|
16 |
|
|
|
17 |
|
|
protected function buildQuery($ids, $conditions = array(), $revision_id = FALSE) {
|
18 |
|
|
$query = parent::buildQuery($ids, $conditions, $revision_id);
|
19 |
|
|
// Add the flag name, which determines the bundle.
|
20 |
|
|
$query->innerJoin('flag', 'flag', 'base.fid = flag.fid');
|
21 |
|
|
$query->addField('flag', 'name', 'flag_name');
|
22 |
|
|
return $query;
|
23 |
|
|
}
|
24 |
|
|
} |