function select_tag_campuses($name = 'campus', $selected = 2, $options = array()) { $c = new Criteria(); $c->addAscendingOrderByColumn(CampusPeer::NAME); $campuses = CampusPeer::doSelect($c); return select_tag($name, objects_for_select($campuses, 'getId', 'getName', $selected, array()), $options); }
public function executeSandbox() { $this->forward404Unless($this->project = ProjectPeer::retrieveByPk('5')); //echo $this->project->getTitle(); $this->user = sfGuardUserPeer::retrieveByUsername('*****@*****.**'); $form = $this->project->getForm('main'); if ($form == null) { $this->project->setForm('main', 'default'); } $campuses[] = array("id" => "085d234b-9cce-6414-2df5-c902c4d1b2da", "rank" => "1", "name" => "UC Berkeley"); $campuses[] = array("id" => "544655f7-64fd-6a34-b535-8a9ebb3c2816", "rank" => "2", "name" => "Other"); $campuses[] = array("id" => "62bbecdf-f338-c6e4-d986-dbea5bdf856f", "rank" => "3", "name" => "UC Los Angeles"); $campuses[] = array("id" => "d3cb5d6b-cadb-9ff4-a1ef-53fe6760dc14", "rank" => "4", "name" => "Orange Coast College"); $campuses[] = array("id" => "c39f272a-a4bb-b414-7514-a7ed6572056b", "rank" => "5", "name" => "Cothink Campus"); $campuses[] = array("id" => "923fc92a-45b1-93f4-2d4b-fcce698f8a49", "rank" => "6", "name" => "Any Campus"); $campuses[] = array("id" => "c43340c1-5bb6-6134-ede4-a9a134e986cb", "rank" => "7", "name" => "UC Santa Barbara"); $campuses[] = array("id" => "ea0b9d54-8206-d334-9d47-c15b69b6c5ba", "rank" => "8", "name" => "UC Santa Cruz"); $campuses[] = array("id" => "0d3cd035-8640-7584-85fe-45df2e4756ce", "rank" => "9", "name" => "Saddleback College"); $campuses[] = array("id" => "13d97531-a57d-9a24-3971-13fd35db51fb", "rank" => "10", "name" => "UC San Francisco"); $campuses[] = array("id" => "1a5cc505-0f46-9c74-bd05-e966c891e43d", "rank" => "11", "name" => "UC San Diego"); $campuses[] = array("id" => "844fbc24-0600-a484-1996-ee8df871ac3d", "rank" => "12", "name" => "UC Riverside"); $campuses[] = array("id" => "ef059e4f-4463-d924-15c5-ed99fb6ea085", "rank" => "13", "name" => "UC Merced"); $campuses[] = array("id" => "7be5b4e4-5a6f-7d84-49ef-f000ecf0ade4", "rank" => "14", "name" => "UC Los Angeles"); $campuses[] = array("id" => "ad73ea61-2374-d1a4-955a-59891021d533", "rank" => "15", "name" => "UC Davis"); $campuses[] = array("id" => "9c85ebc8-a936-58c4-ad85-af60991fbd18", "rank" => "16", "name" => "UC Irvine"); $campuses[] = array("id" => "cbad54e6-d87a-cef4-c9ad-d5a9776639ac", "rank" => "17", "name" => "Google Campus"); $this->getUser()->setAttribute('campus_list', $campuses); $this->campuses = CampusPeer::doSelect(new Criteria()); //$this->project = new Project(); }
public function handleErrorUpdateProfile() { $this->forward404Unless($this->getUser()->isAuthenticated(), 'not logged in, cannot edit profile, obviously'); $this->tab = "editprofile"; $this->profile = $this->getUser()->getProfile(); $this->campuses = CampusPeer::doSelect(new Criteria()); $this->departments = DepartmentPeer::doSelect(new Criteria()); $this->subdepartments = SubdepartmentPeer::doSelect(new Criteria()); $this->setTemplate("editProfile"); return sfView::SUCCESS; }
public function handleErrorSaveNew() { //$this->project = ProjectPeer::retrieveBySlug($this->getRequestParameter('project')); //$this->forward404Unless($this->project, 'Project not found using slug ['.$this->getRequestParameter('project').']'); $this->project = new Project(); $this->campuses = CampusPeer::doSelect(new Criteria()); $this->departments = DepartmentPeer::doSelect(new Criteria()); $this->setTemplate('create'); return sfView::SUCCESS; }
/** * Retrieve multiple objects by pkey. * * @param array $pks List of primary keys * @param PropelPDO $con the connection to use * @throws PropelException Any exceptions caught during processing will be * rethrown wrapped into a PropelException. */ public static function retrieveByPKs($pks, PropelPDO $con = null) { if ($con === null) { $con = Propel::getConnection(CampusPeer::DATABASE_NAME, Propel::CONNECTION_READ); } $objs = null; if (empty($pks)) { $objs = array(); } else { $criteria = new Criteria(CampusPeer::DATABASE_NAME); $criteria->add(CampusPeer::ID, $pks, Criteria::IN); $objs = CampusPeer::doSelect($criteria, $con); } return $objs; }
public function executeListFilter() { $this->campuses = CampusPeer::doSelect(new Criteria()); $this->departments = DepartmentPeer::doSelect(new Criteria()); }
public function executeList() { $this->campuss = CampusPeer::doSelect(new Criteria()); }