/** * Constructor * @param string $alias aliacs for the table being filtered on * @param string $name the name of the filter instance * @param string $label the label of the filter instance * @param boolean $advanced advanced form element flag * @param string $field user table filed name */ function generalized_filter_userprofiledatetime($uniqueid, $alias, $name, $label, $advanced, $field, $options = array()) { parent::generalized_filter_date($uniqueid, $alias, $name, $label, $advanced, $field, $options); $this->_tables = $options['tables']; $this->_fieldid = $options['fieldid']; }
/** * Constructor * @param string $name the name of the filter instance * @param string $label the label of the filter instance * @param boolean $advanced advanced form element flag * @param string $field user table filed name * @param array $options select options */ function generalized_filter_custom_field_datetime($uniqueid, $alias, $name, $label, $advanced, $field, $options = array()) { //ob_start(); //var_dump($options); //$tmp = ob_get_contents(); //ob_end_clean(); //error_log("generalized_filter_custom_field_select($uniqueid, $alias, $name, $label, $advanced, $field, options = {$tmp}"); parent::generalized_filter_date($uniqueid, $alias, $name, $label, $advanced, $field, $options); if (!array_key_exists('datatype', $options)) { print_error('missing_datatype', 'local_eliscore'); } if (!array_key_exists($options['datatype'], $this->_fieldtypes)) { print_error('unknown_datatype', 'local_eliscore'); } if (array_key_exists('wrapper', $options)) { $this->_wrapper = $options['wrapper']; } if (array_key_exists('innerfield', $options)) { $this->_innerfield = $options['innerfield']; } $this->_datatype = $options['datatype']; $this->_fieldid = $options['fieldid']; //set up a "prefix" for the subquery, typically involving IN or EXISTS if (!empty($options['subqueryprefix'])) { //manually specified via constructor $this->_subqueryprefix = $options['subqueryprefix']; } else { $this->_subqueryprefix = "{$alias}.id IN "; } //allow for specification of extra conditions to impose on the IN/ EXISTS subquery $this->_extraconditions = ''; if (!empty($options['extraconditions'])) { $this->_extraconditions = $options['extraconditions']; } if (!empty($options['contextlevel'])) { //store the context level if it's specified $this->_contextlevel = $options['contextlevel']; } }