Skip to content

Commit 40d375f

Browse files
Issue #10: Include all handler for views.
1 parent 778716b commit 40d375f

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

pgapi.info

+5
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,8 @@ name = Payment Gateway API
22
description = Payment Gateway API.
33
package = "Payment Gateway API"
44
core = 7.x
5+
6+
files[] = pgapi_views_handler_field_amount.inc
7+
files[] = pgapi_views_handler_field_gateway.inc
8+
files[] = pgapi_views_handler_field_status.inc
9+
files[] = pgapi_views_handler_field_edit_link.inc

pgapi_views_handler_field_status.inc

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
/**
4+
* @file
5+
* Definition of pgapi_views_handler_field_status.
6+
*/
7+
8+
/**
9+
* Render a field as a status value.
10+
*
11+
* @ingroup views_field_handlers
12+
*/
13+
class pgapi_views_handler_field_status extends views_handler_field {
14+
function render($values) {
15+
$value = $this->get_value($values);
16+
return '<div class="pgapi-status-' . $value . '">' . pgapi_get_status($value) . '</div>';
17+
}
18+
}

0 commit comments

Comments
 (0)