/** * Uses the given data to fill the object values. This can be used * as a generic function for storing data if the concrete rule type * isn't known in advance. * * @param Array $data * @return AdmissionRule This object. */ public function setAllData($data) { parent::setAllData($data); if ($data['distributiondate']) { if (!$data['distributiontime']) { $data['distributiontime'] = '23:59'; } $ddate = strtotime($data['distributiondate'] . ' ' . $data['distributiontime']); $this->setDistributionTime($ddate); } if ($data['enable_FCFS']) { $this->setDistributionTime(0); } if ($data['startdate']) { $starttime = strtotime($data['startdate'] . ' ' . $data['starttime']); if ($starttime > time()) { $this->minimum_timespan_to_distribution_time = $this->minimum_timespan_to_distribution_time + ($starttime - time()) / 60; } } return $this; }
/** * Uses the given data to fill the object values. This can be used * as a generic function for storing data if the concrete rule type * isn't known in advance. * * @param Array $data * @return AdmissionRule This object. */ public function setAllData($data) { parent::setAllData($data); if ($data['startdate']) { $sdate = $data['startdate']; $stime = $data['starttime']; $parsed = date_parse($sdate . ' ' . $stime); $timestamp = mktime($parsed['hour'], $parsed['minute'], 0, $parsed['month'], $parsed['day'], $parsed['year']); $this->setStartTime($timestamp); } if ($data['enddate']) { $edate = $data['enddate']; $etime = $data['endtime']; if (!$etime) { $etime = '23:59'; } $parsed = date_parse($edate . ' ' . $etime); $timestamp = mktime($parsed['hour'], $parsed['minute'], 0, $parsed['month'], $parsed['day'], $parsed['year']); $this->setEndTime($timestamp); } return $this; }
/** * Uses the given data to fill the object values. This can be used * as a generic function for storing data if the concrete rule type * isn't known in advance. * * @param Array $data * @return AdmissionRule This object. */ public function setAllData($data) { parent::setAllData($data); $this->setPassword($data['password1']); return $this; }
/** * Uses the given data to fill the object values. This can be used * as a generic function for storing data if the concrete rule type * isn't known in advance. * * @param Array $data * @return AdmissionRule This object. */ public function setAllData($data) { UserFilterField::getAvailableFilterFields(); parent::setAllData($data); $this->conditions = array(); foreach ($data['conditions'] as $condition) { $this->addCondition(unserialize($condition)); } return $this; }
/** * Uses the given data to fill the object values. This can be used * as a generic function for storing data if the concrete rule type * isn't known in advance. * * @param Array $data * @return AdmissionRule This object. */ public function setAllData($data) { parent::setAllData($data); $this->mandatory_course_id = $data['mandatory_course_id'] ?: $data['mandatory_course_id_old']; $this->modus = $data['modus']; return $this; }
/** * Uses the given data to fill the object values. This can be used * as a generic function for storing data if the concrete rule type * isn't known in advance. * * @param Array $data * @return AdmissionRule This object. */ public function setAllData($data) { parent::setAllData($data); $this->maxNumber = intval($data['maxnumber']); return $this; }