public function getVSppsJoinAcademicCalendar($criteria = null, $con = null) { include_once 'lib/model/om/BaseVSppPeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collVSpps === null) { if ($this->isNew()) { $this->collVSpps = array(); } else { $criteria->add(VSppPeer::ACADEMIC_COST_ID, $this->getId()); $this->collVSpps = VSppPeer::doSelectJoinAcademicCalendar($criteria, $con); } } else { $criteria->add(VSppPeer::ACADEMIC_COST_ID, $this->getId()); if (!isset($this->lastVSppCriteria) || !$this->lastVSppCriteria->equals($criteria)) { $this->collVSpps = VSppPeer::doSelectJoinAcademicCalendar($criteria, $con); } } $this->lastVSppCriteria = $criteria; return $this->collVSpps; }
public function executeEdit() { $group_id = $this->getContext()->getUser()->getAttribute('group_id', null, 'bo'); $c = new Criteria(); $c->add(JobPeer::CODE, $this->getModuleName()); $job = JobPeer::doSelectOne($c); $acl = AclPeer::retrieveByPK($group_id, $job->getId()); if (!$acl) { $this->forward('default', 'error404'); } $this->can_add = $acl->getAddPriv() == 1; $this->can_edit = $acl->getEditPriv() == 1; $this->can_remove = $acl->getRemovePriv() == 1; $history_spp = VSppPeer::retrieveByPk($this->getRequestParameter('id')); $this->forward404Unless($history_spp); $actions = array(array('name' => 'save', 'type' => 'submit', 'options' => array('class' => 'save_button', 'onclick' => "action_type.value=this.value"))); if ($acl->getRemovePriv()) { array_push($actions, array('name' => 'delete', 'url' => 'history_spp/delete?id=' . $history_spp->getId(), 'color' => 'red')); } array_push($actions, array('name' => 'cancel', 'url' => 'history_spp/list', 'color' => 'black')); $this->subtitle = $history_spp->getStudent()->toString() . ' - id:' . $history_spp->getId(); $this->type = 'edit'; $this->history_spp = $history_spp; $this->actions = $actions; }
public static function retrieveByPKs($pks, $con = null) { if ($con === null) { $con = Propel::getConnection(self::DATABASE_NAME); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(); $criteria->add(VSppPeer::ID, $pks, Criteria::IN); $objs = VSppPeer::doSelect($criteria, $con); } return $objs; }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = VSppPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setStudentId($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setAcademicCostId($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setUserId($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setAmount($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setCreatedAt($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setAcademicProcessId($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setUpdatedAt($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setPayerType($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setReceivable($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setPaid($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setStatus($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setComments($arr[$keys[12]]); } if (array_key_exists($keys[13], $arr)) { $this->setPaymentModelId($arr[$keys[13]]); } if (array_key_exists($keys[14], $arr)) { $this->setTransactionStatusId($arr[$keys[14]]); } if (array_key_exists($keys[15], $arr)) { $this->setPaidAt($arr[$keys[15]]); } if (array_key_exists($keys[16], $arr)) { $this->setYear($arr[$keys[16]]); } if (array_key_exists($keys[17], $arr)) { $this->setMonth($arr[$keys[17]]); } if (array_key_exists($keys[18], $arr)) { $this->setAcademicCostComponentId($arr[$keys[18]]); } if (array_key_exists($keys[19], $arr)) { $this->setAcademicCalendarId($arr[$keys[19]]); } }