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


PHP ControllerBase::saveForm方法代码示例

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


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

示例1: saveForm

 /**
  * @remotable
  * @formHandler
  */
 public function saveForm($a)
 {
     //capture the param 'staffList' and loop through the array of IDs
     //echo $a['staffList'];
     if (strlen($a['staffList'] > 0)) {
         $orgID = $this->getOrgID();
         $staff = $a['staffList'];
         $q = Doctrine_Manager::getInstance()->getCurrentConnection();
         $query = "UPDATE contact_value SET \r\n\t\t\t\t\t\t\tisRedFlag =  CASE \r\n\t\t\t\t\t\t\t\t\tWhen id in ({$staff})  \r\n\t\t\t\t\t\t\t\t\t\t THEN  1  \r\n\t\t\t\t\t\t\t\t\tElse 0\r\n\t\t\t\t\t\t\t\t\tend\r\n\t\t\t\t\t\t WHERE orgID={$orgID}";
         $result = $q->execute($query);
         //$q = Doctrine_Manager::getInstance()->getCurrentConnection();
         //$query = "UPDATE `contact_value` SET `isRedFlag` = '0' WHERE `orgID` = $orgID;";
         //$result = $q->execute($query);
         //$query = "UPDATE `contact_value` SET `isRedFlag` = '1' WHERE (`contact_value`.`ID` IN ($staff) AND `orgID` = $orgID);";
         //$result = $q->execute($query);
         //$q = Doctrine_Query::create()
         //->update('ContactValue')
         //->set('isRedFlag', 0)
         //->where('ID NOT IN (' . $a['staffList'] . ')')
         //->andWhere('orgID = '.$orgID.'');
         //$q->execute();
         //echo $q->getSqlQuery();
     }
     return parent::saveForm($a);
 }
开发者ID:unixmiah,项目名称:codeigniter-doctrine-extjs,代码行数:29,代码来源:RedFlagAPI.php

示例2: saveForm

 /**
  * @remotable
  * @formHandler
  */
 public function saveForm($a)
 {
     $return = parent::saveForm($a);
     if (isset($a["colorCode"])) {
         $user = $this->getSessionValue("contactID");
         $q = Doctrine_Query::create()->update("ContactValue c")->set("c.colorCode", "?", $a["colorCode"])->where("c.ID = ?", $user);
         $q->execute();
         $return["data"]["colorCode"] = $a["colorCode"];
     }
     return $return;
 }
开发者ID:unixmiah,项目名称:codeigniter-doctrine-extjs,代码行数:15,代码来源:SiteConfigurationAPI.php

示例3: saveForm

 /**
  * @remotable
  * @formHandler
  */
 public function saveForm($a)
 {
     //do current password validation here and update $a Array
     if (strlen($a["curr_password"]) > 0) {
         $hashedPass = $this->generateHash($a["curr_password"]);
         $currPass = $this->doPasswordCheck("");
         if ($hashedPass == $currPass->password) {
             $a["password"] = $a["new_password"];
         } else {
             return array("success" => false, "msg" => "The current password you have entered does not match our records.");
         }
     }
     return parent::saveForm($a);
 }
开发者ID:unixmiah,项目名称:codeigniter-doctrine-extjs,代码行数:18,代码来源:ProfileAPI.php

示例4: saveForm

 /**
  * @remotable
  * @formHandler
  */
 public function saveForm($a)
 {
     //$this->setupOneToOne($a);
     $a["incidentSplitDate"] = date("Y-m-d", strtotime($a["incidentSplitDate"]));
     $date = strtotime($a["incidentSplitDate"] . " " . $a["incidentSplitTime"]);
     $a["incidentTime"] = date("Y-m-d H:i:s", $date);
     $return = parent::saveForm($a);
     if (isset($return['data'])) {
         $data = $return["data"];
         $ts = strtotime($data["incidentTime"]);
         $data["incidentSplitDate"] = date("Y-m-d", $ts);
         $data["incidentSplitTime"] = date("g:ia", $ts);
         $return["data"] = $data;
     }
     return $return;
 }
开发者ID:unixmiah,项目名称:codeigniter-doctrine-extjs,代码行数:20,代码来源:IncidentAPI.php

示例5: saveForm

 /**
  * @remotable
  * @formHandler
  */
 public function saveForm($a)
 {
     $a['type'] = 1;
     return parent::saveForm($a);
 }
开发者ID:unixmiah,项目名称:codeigniter-doctrine-extjs,代码行数:9,代码来源:UserAPI.php

示例6: saveForm

 /**
  * @remotable
  * @formHandler
  */
 public function saveForm($a)
 {
     $_POST = $this->populateArray($_POST);
     $recordId = $this->getLoadFormID($a);
     //New record with no recurrence route to existing function from parent
     if ($this->isExisitingRecord($recordId) == false && (!isset($a['rrule']) || $a['rrule'] == "")) {
         // call parent method to update
         return parent::saveForm($a);
     }
     //Existing record with no rrule
     if ($this->isExisitingRecord($recordId) == true && (!isset($a['rrule']) || $a['rrule'] == "")) {
         return parent::saveForm($a);
     }
     //Existing record with rrule
     if ($this->isExisitingRecord($recordId) == true && (isset($a['rrule']) || $a['rrule'] != "")) {
         $exeResult = $this->removeRecurrences($a['atcRecurrID']);
         if (!$exeResult) {
             //if delete fails
             return array("success" => false);
         }
     }
     $rrule = $this->ical_rrule($a['rrule']);
     $a = $this->actRecurr($a);
     if (isset($rrule['FREQ'])) {
         if (!isset($rrule['INTERVAL'])) {
             $rrule['INTERVAL'] = 1;
         }
         //is this BYDAY weekly with selected dates like MO,TU.
         if (array_key_exists('BYDAY', $rrule)) {
             return $this->processDatesByDay($rrule);
         } else {
             return $this->processDates($rrule);
         }
     }
 }
开发者ID:unixmiah,项目名称:codeigniter-doctrine-extjs,代码行数:39,代码来源:ActivityDetailAPI.php

示例7: saveForm

 /**
  * @remotable
  * @formHandler
  */
 public function saveForm($a)
 {
     $a['orgID'] = $this->getOrgID();
     $a['mfrom'] = $this->getUserName();
     return parent::saveForm($a);
 }
开发者ID:unixmiah,项目名称:codeigniter-doctrine-extjs,代码行数:10,代码来源:MessageAPI.php


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