当前位置: 首页>>代码示例>>PHP>>正文


PHP Job::setContactEmail方法代码示例

本文整理汇总了PHP中Job::setContactEmail方法的典型用法代码示例。如果您正苦于以下问题:PHP Job::setContactEmail方法的具体用法?PHP Job::setContactEmail怎么用?PHP Job::setContactEmail使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Job的用法示例。


在下文中一共展示了Job::setContactEmail方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: save

 /**
  * Serialize the form into the database.
  *
  */
 public function save($con = null)
 {
     if ($this->getObject()) {
         $j = $this->getObject();
     } else {
         $j = new Job();
     }
     $j->setPublicationId($this->getValue("publication_id"));
     $j->setStatusId($this->getValue("status_id"));
     $j->setEvent($this->getValue("event"));
     $j->setDate($this->getValue("date"));
     $j->setStartTime($this->getValue("start_time"));
     $j->setEndTime($this->getValue("end_time"));
     $j->setDueDate($this->getValue("due_date"));
     $j->setContactName($this->getValue("contact_name"));
     $j->setContactPhone($this->getValue("contact_phone"));
     $j->setContactEmail($this->getValue("contact_email"));
     $j->setAcctNum($this->getValue("acct_num"));
     $j->save();
     $logEntry = new Log();
     $logEntry->setWhen(time());
     $logEntry->setPropelClass("Job");
     $logEntry->setSfGuardUserProfileId(sfContext::getInstance()->getUser()->getUserId());
     $logEntry->setMessage("Basic info updated.");
     $logEntry->setLogMessageTypeId(sfConfig::get("app_log_type_update"));
     $logEntry->setPropelId($j->getId());
     $logEntry->save();
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:32,代码来源:BasicInfoJobForm.class.php

示例2: save

 /**
  * Serialize the form into the database.
  *
  */
 public function save($con = null)
 {
     $j = new Job();
     $j->setEvent($this->getValue("event"));
     $j->setStartTime($this->getValue("start_time"));
     $j->setEndTime($this->getValue("end_time"));
     $j->setDueDate($this->getValue("due_date"));
     $j->setPublicationId($this->getValue("publication_id"));
     $j->setStreet($this->getValue("street"));
     $j->setCity($this->getValue("city"));
     $j->setState($this->getValue("state"));
     $j->setZip($this->getValue("zip"));
     $j->setContactName($this->getValue("contact_name"));
     $j->setContactPhone($this->getValue("contact_phone"));
     $j->setContactEmail($this->getValue("contact_email"));
     $j->setStatusId(sfConfig::get("app_job_status_pending", 1));
     $j->setProjectId($this->getValue("project_id"));
     $j->save();
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:23,代码来源:JobForm.class.php.REMOTE.27784.php

示例3: transformJobs

 public function transformJobs()
 {
     $statusHash = array();
     $statusObjects = StatusPeer::doSelect(new Criteria());
     foreach ($statusObjects as $s) {
         $statusHash[$s->getState()] = $s->getId();
     }
     $this->jobKeys = array();
     $dom = DOMDocument::load("tuftsph_jm2db.xml");
     $jobs = $dom->getElementsByTagName("jobs");
     $total = $jobs->length;
     $count = 1;
     $jobList = array();
     foreach ($jobs as $job) {
         $jid = 0;
         $childNodes = $job->childNodes;
         $j = new Job();
         $del = new Delivery();
         $jid = 1;
         $startTime = null;
         $shootStart = null;
         $shootEnd = null;
         $endTime = null;
         $notes = "";
         $photog = 0;
         $slug = "";
         $childNodes = $job->childNodes;
         foreach ($childNodes as $child) {
             switch ($child->nodeName) {
                 case "id":
                     $jid = $child->textContent;
                     break;
                 case "shoot_name":
                     $j->setEvent($child->textContent);
                     break;
                 case "shoot_date":
                     $j->setDate($child->textContent);
                     break;
                 case "shoot_startT":
                     $startTime = $child->textContent;
                     break;
                 case "shoot_start":
                     $shootStart = $child->textContent;
                     break;
                 case "shoot_endT":
                     $endTime = $child->textContent;
                     break;
                 case "shoot_end":
                     $shootEnd = $child->textContent;
                     break;
                 case "shoot_duedate":
                     $j->setDueDate($child->textContent);
                     break;
                 case "submitted_at":
                     $j->setCreatedAt($child->textContent);
                     break;
                 case "requester_address":
                     $j->setStreet($child->textContent);
                     break;
                 case "requester_campus":
                     $j->setCity($child->textContent);
                     break;
                 case "requester_name":
                     $j->setContactName($child->textContent);
                     break;
                 case "requester_email":
                     $j->setContactEmail($child->textContent);
                     break;
                 case "requester_phone":
                     $j->setContactPhone($child->textContent);
                     break;
                 case "internal_notes":
                     $notes .= $child->textContent . "<br/>";
                     break;
                 case "billing_notes":
                     $notes .= $child->textContent . "<br/>";
                     break;
                 case "estimate":
                     $j->setEstimate($child->textContent);
                     break;
                 case "billing_acctnum":
                     $j->setAcctNum($child->textContent);
                     break;
                 case "billing_deptid":
                     $j->setDeptId($child->textContent);
                     break;
                 case "billing_grantid":
                     $j->setGrantId($child->textContent);
                     break;
                 case "shoot_directions":
                     $j->setOther($child->textContent);
                     break;
                 case "status":
                     $j->setStatusId($statusHash[$child->textContent]);
                     break;
                 case "photog_id":
                     $photog = $child->textContent;
                     break;
                 case "delivery_pubname":
                     $del->setPubName($child->textContent);
//.........这里部分代码省略.........
开发者ID:adatta02,项目名称:comp190-code,代码行数:101,代码来源:transformYAML.php

示例4: save

 public function save($con = null)
 {
     sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url', 'Object', 'Tag', 'Text', 'PMRender', 'Asset', 'Helper'));
     $j = new Job();
     $j->setEvent($this->getValue("event"));
     $j->setStartTime($this->getValue("start_time"));
     $j->setEndTime($this->getValue("end_time"));
     $j->setDate($this->getValue("date"));
     $j->setDueDate($this->getValue("due_date"));
     $j->setAcctNum($this->getValue("acct_num"));
     $j->setDeptId($this->getValue("dept_id"));
     $j->setPublicationId($this->getValue("publication_id"));
     $j->setStreet($this->getValue("street"));
     $j->setCity($this->getValue("city"));
     $j->setState($this->getValue("state"));
     $j->setZip($this->getValue("zip"));
     if (is_array($this->getValue("photo_type"))) {
         $j->setPhotoType(implode(", ", $this->getValue("photo_type")));
     } else {
         $j->setPhotoType($this->getValue("photo_type"));
     }
     $j->setOther($this->getValue("other"));
     $j->setQues1($this->getValue("ques1"));
     $j->setQues2($this->getValue("ques2"));
     $j->setQues3($this->getValue("ques3"));
     $j->setContactName($this->getValue("contact_name"));
     $j->setContactPhone($this->getValue("contact_phone"));
     $j->setContactEmail($this->getValue("contact_email"));
     $j->setStatusId(sfConfig::get("app_job_status_pending", 1));
     $j->setProjectId($this->getValue("project_id"));
     $j->save();
     $body = "Dear {$this->getValue("name")},\r\n\r\nYour job, {$this->getValue("event")}, has been entered into our system. \r\nIf you wish to track the progress of your job, you may do so at http://jobs.tuftsphoto.com \r\n\r\nThanks for using University Photography; we look forward to working with you! \r\n\r\nThe Tufts Photo Team \r\nUniversity Photography\r\n80 George St., First Floor\r\nMedford, MA 02155\r\nTel: 617.627.4282\r\nFax: 617.627.3549\r\nphoto@tufts.edu\r\n\r\n\r\n" . getJobDetails($j);
     mail($this->getValue("email") . ", photo@tufts.edu", "University Photography Job #" . $j->getId() . " - " . $j->getEvent(), $body, "From: photo@tufts.edu");
     $user = sfContext::getInstance()->getUser();
     if ($this->getValue("clientId") > 0 && ($user->hasCredential("client") || $user->hasCredential("admin"))) {
         $client = ClientPeer::retrieveByPK($this->getValue("clientId"));
         $j->addClient($client);
     }
     // if they are a user lets make them a client
     if ($user->getProfile()->getUserType()->getId() == sfConfig::get("app_user_type_user")) {
         $clientProfile = new Client();
         $clientProfile->setUserId($user->getProfile()->getId());
         $clientProfile->setName($this->getValue("name"));
         $clientProfile->setDepartment($this->getValue("department"));
         $clientProfile->setAddress($this->getValue("address"));
         $clientProfile->setEmail($this->getValue("email"));
         $clientProfile->setPhone($this->getValue("phone"));
         $clientProfile->save();
         $user->getProfile()->setUserTypeId(sfConfig::get("app_user_type_client"));
         $user->getProfile()->save();
         $user->clearCredentials();
         $user->addCredential("client");
     } else {
         if ($user->getProfile()->getUserType()->getId() == sfConfig::get("app_user_type_client")) {
             $c = new Criteria();
             $c->add(ClientPeer::USER_ID, $user->getProfile()->getId());
             $clientProfile = ClientPeer::doSelectOne($c);
             if (is_null($clientProfile)) {
                 $clientProfile = new Client();
             }
             $clientProfile->setUserId($user->getProfile()->getId());
             $clientProfile->setName($this->getValue("name"));
             $clientProfile->setDepartment($this->getValue("department"));
             $clientProfile->setAddress($this->getValue("address"));
             $clientProfile->setEmail($this->getValue("email"));
             $clientProfile->setPhone($this->getValue("phone"));
             $clientProfile->save();
         }
     }
     if (isset($clientProfile) && !is_null($clientProfile)) {
         $j->addClient($clientProfile);
     }
     return $j->getId();
 }
开发者ID:adatta02,项目名称:comp190-code,代码行数:74,代码来源:RequestJobForm.class.php


注:本文中的Job::setContactEmail方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。