/** * @see UserFilterField::__construct */ public function __construct($fieldId = '') { parent::__construct($fieldId); $this->validValues = array(); $this->relations = array('DegreeCondition' => array('local_field' => 'abschluss_id', 'foreign_field' => 'abschluss_id'), 'SubjectCondition' => array('local_field' => 'studiengang_id', 'foreign_field' => 'studiengang_id')); $this->validCompareOperators = array('>=' => _('mindestens'), '<=' => _('höchstens'), '=' => _('ist'), '!=' => _('ist nicht')); // Initialize to some value in case there are no semester numbers. $maxsem = 15; // Calculate the maximal available semester. $stmt = DBManager::get()->query("SELECT MAX(" . $this->valuesDbIdField . ") AS maxsem " . "FROM `" . $this->valuesDbTable . "`"); if ($current = $stmt->fetch(PDO::FETCH_ASSOC)) { if ($current['maxsem']) { $maxsem = $current['maxsem']; } } for ($i = 1; $i <= $maxsem; $i++) { $this->validValues[$i] = $i; } }
/** * @see UserFilterField::__construct */ public function __construct($fieldId = '') { parent::__construct($fieldId); $this->relations = array('DegreeCondition' => array('local_field' => 'abschluss_id', 'foreign_field' => 'abschluss_id')); }
/** * @see UserFilterField::__construct */ public function __construct($fieldId = '') { parent::__construct($fieldId); $this->relations = array('SubjectCondition' => array('local_field' => 'studiengang_id', 'foreign_field' => 'studiengang_id')); }