Parent Directory
|
Revision Log
|
Revision Graph
#330247 by ulf1, adding new files
| 1 | <?php |
| 2 | // $Id$ |
| 3 | |
| 4 | /** |
| 5 | * Handler for total invites field. |
| 6 | */ |
| 7 | |
| 8 | class rsvp_handler_field_rsvp_invite_total_invites extends views_handler_field { |
| 9 | |
| 10 | function query() { |
| 11 | |
| 12 | $this->ensure_my_table(); |
| 13 | $formula = 'COUNT(' . $this->table_alias . '.hash' . ')'; |
| 14 | $this->query->add_field(NULL, $formula, $this->table_alias . '_total_invites'); |
| 15 | $this->query->add_groupby('rsvp.nid'); |
| 16 | } |
| 17 | |
| 18 | function render($values) { |
| 19 | |
| 20 | $item = !empty($values->{$this->table_alias . '_total_invites'}) ? $values->{$this->table_alias . '_total_invites'} : 0; |
| 21 | return $item; |
| 22 | } |
| 23 | } |
| ViewVC Help | |
| Powered by ViewVC 1.1.2 |