Ejemplo n.º 1
0
 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();
 }
Ejemplo n.º 2
0
 public function getProject()
 {
     if (strtolower($this->getModel()) == 'project') {
         $project = ProjectPeer::retrieveByPk($this->getModelId());
         if ($project != null) {
             return $project;
         }
     }
     return false;
 }
Ejemplo n.º 3
0
 public function executeAjaxRemovePosition()
 {
     $this->forward404Unless($this->getRequest()->isXmlHttpRequest(), 'moo');
     $position = ProjectPositionPeer::retrieveByUuid($this->getRequestParameter('uuid'));
     $this->forward404Unless($position, 'position not found, unable to remove it - uuid: ' . $this->getRequestParameter('uuid'));
     $project = ProjectPeer::retrieveByPk($position->getProjectId());
     // TODO: Should probably separate project_user into project_positions, project_applications, and project_user
     // consider this a temporary (but time-consuming) patch
     $position->delete();
     $this->newPosition = new ProjectPosition();
     $this->project = $project;
     $this->setTemplate('ajaxAddPosition');
 }
Ejemplo n.º 4
0
 /**
  * Get the associated Project object
  *
  * @param      PropelPDO Optional Connection object.
  * @return     Project The associated Project object.
  * @throws     PropelException
  */
 public function getProject(PropelPDO $con = null)
 {
     if ($this->aProject === null && $this->task_id !== null) {
         $this->aProject = ProjectPeer::retrieveByPk($this->task_id);
         /* The following can be used additionally to
         		   guarantee the related object contains a reference
         		   to this object.  This level of coupling may, however, be
         		   undesirable since it could result in an only partially populated collection
         		   in the referenced object.
         		   $this->aProject->addBuilds($this);
         		 */
     }
     return $this->aProject;
 }