How can I add a where clause in custom filter handler for views query.
I need to add where clause to alter views query using custom filter handler.
My code in custom filter:
class fee_management_handler_filter_payment_status extends views_handler_filter_many_to_one {
function get_value_options() {
$this->value_options = array('1' => 'Paid', '0' => 'Unpaid');
}
/**
* Called to implement a payment status.
*/
function query() {
if filter = unpaid or 0
view conditions + = ' AND pid IS NULL';
parent::query();
}
}