Created
February 6, 2012 16:17
-
-
Save ezra-g/1753059 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class og_statistics_handler_filter_posts_count extends views_handler_filter_boolean_operator { | |
function option_definition() { | |
$options = parent::option_definition(); | |
$options['value'] = array('default' => 1); | |
return $options; | |
} | |
function options_form(&$form, &$form_state) { | |
parent::options_form($form, $form_state); | |
$form['value']['#type'] = 'radios'; | |
$form['value']['#title'] = t('Filter on group posts'); | |
$form['value']['#options'] = array(1 => t('Has posts'), 0 => t('Has no posts')); | |
} | |
function query() { | |
// @TODO: insert magical query stuff. | |
// add_where? perhaps. | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment