當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Content::commit方法代碼示例

本文整理匯總了PHP中Content::commit方法的典型用法代碼示例。如果您正苦於以下問題:PHP Content::commit方法的具體用法?PHP Content::commit怎麽用?PHP Content::commit使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Content的用法示例。


在下文中一共展示了Content::commit方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: commit

 public function commit()
 {
     //				echo "cococ";exit();
     $this->redirect_with_id = FALSE;
     if (DataHandler::getValueByArrayIndex($_POST, "destaque")) {
         if (is_array($_POST["category"])) {
             $_POST["category"] = DataHandler::appendArray($_POST["category"], $_POST["destaque"]);
         } else {
             throw new Exception("envie a array de categoria. Sem isso a content nao funciona.");
         }
     }
     parent::commit();
 }
開發者ID:reytuty,項目名稱:facil,代碼行數:13,代碼來源:MenuTop.php

示例2: commit

 public function commit($redirect_page = TRUE, $gallery_type = "image")
 {
     //iniciando o retorno padrao
     $_POST["active"] = 1;
     if (!isset($_POST["category"]) || $_POST["category"] == NULL) {
         $_POST["category"] = array($this->category_id);
     } else {
         if (!is_array($_POST["category"])) {
             $_POST["category"] = array($_POST["category"], $this->category_id);
         } else {
             //é uma array, mas melhor garantir que tem o produto id
             $_POST["category"][] = $this->category_id;
         }
     }
     if (isset($_POST["hat"])) {
         $hat = $_POST["hat"];
         //tira o vinculo com a tabela ano (que nao existe)
         if ($content_id) {
             //adiciona o vinculo com a tabela ano de indice hat
             $LinkDAO = LinkDAO::getInstance();
         }
         //deleta vinculos com categoria
         $LinkDAO->deleteAllFromLinkedTableByTableAndTableId('content', $content_id, 'ano');
         $LinkDAO->insert('ano', $hat, 'content', $content_id, 1, 0);
     }
     if (isset($_POST["title"])) {
         $_POST["slug"] = DataHandler::strToURL($_POST["title"]);
     }
     if (!isset($_POST["id"]) && DataHandler::getValueByArrayIndex($this->arrayVariable, "id")) {
         $_POST["id"] = DataHandler::getValueByArrayIndex($this->arrayVariable, "id");
     }
     if (!isset($_POST["order"])) {
         $_POST["order"] = NULL;
     }
     $return = parent::commit(FALSE, $gallery_type);
     $this->updatePdf($return->id);
     if ($redirect_page) {
         //Navigation::redirect($this->my_redirect);
         Navigation::redirect("backend/client/change/id." . $return->id);
         exit;
     }
     return $return;
 }
開發者ID:reytuty,項目名稱:facil,代碼行數:43,代碼來源:Client.php

示例3: commit

 public function commit()
 {
     if (DataHandler::getValueByArrayIndex($_POST, "title") != NULL) {
         $slug = DataHandler::removeAccent(DataHandler::getValueByArrayIndex($_POST, "title"));
         $slug = DataHandler::removeSpecialCharacters($slug);
         $slug = strtolower($slug);
         $_POST["slug"] = $slug;
     }
     if (DataHandler::getValueByArrayIndex($_POST, "date") !== NULL && $_POST["date"] == "") {
         $_POST["date"] = "now()";
     }
     if ($this->sub == "unidades") {
         $_POST["content"] = "unidades";
     }
     //Debug::print_r($_POST);
     //exit();
     //echo Debug::li($this->my_redirect);exit();
     $this->redirect_with_id = FALSE;
     if (DataHandler::getValueByArrayIndex($_POST, "category")) {
         if (is_array($_POST["category"])) {
             //$_POST["category"] = $_POST["category"];
             if ($this->sub == "blog") {
                 $_POST["category"][] = 36;
             }
             //echo Debug::print_r($_POST["category"]);
             //exit();
         } else {
             throw new Exception("envie a array de categoria. Sem isso a content nao funciona.");
         }
     }
     parent::commit();
 }
開發者ID:reytuty,項目名稱:facil,代碼行數:32,代碼來源:Page.php

示例4: commit

 public function commit($redirect_page = TRUE, $gallery_type = "image")
 {
     //iniciando o retorno padrao
     $_POST["active"] = 1;
     if (!isset($_POST["category"]) || $_POST["category"] == NULL) {
         $_POST["category"] = array($this->category_id);
     } else {
         if (!is_array($_POST["category"])) {
             $_POST["category"] = array($_POST["category"], $this->category_id);
         } else {
             //é uma array, mas melhor garantir que tem o produto id
             $_POST["category"][] = $this->category_id;
         }
     }
     if (isset($_POST["title"])) {
         $_POST["slug"] = DataHandler::strToURL($_POST["title"]);
     }
     if (!isset($_POST["id"]) && DataHandler::getValueByArrayIndex($this->arrayVariable, "id")) {
         $_POST["id"] = DataHandler::getValueByArrayIndex($this->arrayVariable, "id");
     }
     if (!isset($_POST["order"])) {
         $_POST["order"] = NULL;
     }
     if (!isset($_POST["hat"])) {
         $_POST["hat"] = "nao";
     }
     if (!isset($_POST["author"])) {
         $_POST["author"] = "nao";
     }
     return parent::commit($redirect_page, $gallery_type);
 }
開發者ID:reytuty,項目名稱:facil,代碼行數:31,代碼來源:Equipe.php

示例5: commit

 public function commit($redirect_page = TRUE, $gallery_type = "image")
 {
     //iniciando o retorno padrao
     //$_POST["active"] = 1;
     if (!isset($_POST["category"]) || $_POST["category"] == NULL) {
         $_POST["category"] = array($this->category_id);
     } else {
         if (!is_array($_POST["category"])) {
             $_POST["category"] = array($_POST["category"], $this->category_id);
         } else {
             //é uma array, mas melhor garantir que tem o produto id
             $_POST["category"][] = $this->category_id;
         }
     }
     if (isset($_POST["title"])) {
         $_POST["slug"] = DataHandler::strToURL($_POST["title"]);
     }
     if (!isset($_POST["id"]) && DataHandler::getValueByArrayIndex($this->arrayVariable, "id")) {
         $_POST["id"] = DataHandler::getValueByArrayIndex($this->arrayVariable, "id");
     }
     if (!isset($_POST["order"])) {
         $_POST["order"] = NULL;
     }
     if (!isset($_POST["hat"])) {
         $_POST["hat"] = "nao";
     }
     if (isset($_POST["nao_e_produto"])) {
         $_POST["active"] = 2;
     }
     if (!isset($_POST["author"])) {
         $_POST["author"] = "nao";
     }
     // Debug::print_r($_POST);exit();
     $return = parent::commit(FALSE, $gallery_type);
     $this->updatePdf($return->id);
     if ($redirect_page) {
         //Navigation::redirect($this->my_redirect);
         Navigation::redirect("backend/product/change/id." . $return->id);
         exit;
     }
     return $return;
 }
開發者ID:reytuty,項目名稱:facil,代碼行數:42,代碼來源:Product.php


注:本文中的Content::commit方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。