Esempio n. 1
0
 /**
  * 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_userprofiletext($uniqueid, $alias, $name, $label, $advanced, $field, $options = array())
 {
     parent::generalized_filter_text($uniqueid, $alias, $name, $label, $advanced, $field, $options);
     $this->_tables = $options['tables'];
     $this->_fieldid = $options['fieldid'];
     //print_object($this);
 }
 /**
  * Constructor
  * @param string $alias     Alias 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_custom_field_text($uniqueid, $alias, $name, $label, $advanced, $field, $options = array())
 {
     parent::generalized_filter_text($uniqueid, $alias, $name, $label, $advanced, $field, $options);
     if (!array_key_exists('datatype', $options)) {
         print_error('missing_datatype', 'elis_core');
     }
     if (!array_key_exists($options['datatype'], $this->_fieldtypes)) {
         print_error('unknown_datatype', 'elis_core');
     }
     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 {
         //default to "fieldname IN ..."
         $full_fieldname = $this->get_full_fieldname();
         $this->_subqueryprefix = "{$full_fieldname} 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'])) {
         $this->_contextlevel = $options['contextlevel'];
     }
 }
Esempio n. 3
0
 /**
  * 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_clustertext($uniqueid, $alias, $name, $label, $advanced, $field, $options = array())
 {
     parent::generalized_filter_text($uniqueid, $alias, $name, $label, $advanced, $field, $options);
 }
Esempio n. 4
0
 /**
  * Returns an array of comparison operators
  * @return array of comparison operators
  */
 function getOperators()
 {
     $ops = parent::getOperators();
     if ($this->_datatype == 'text') {
         // remove 'is equal to' for long text areas with HTML tags!
         unset($ops[generalized_filter_text::$OPERATOR_IS_EQUAL_TO]);
     }
     return $ops;
 }