当前位置: 首页>>代码示例>>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;未经允许,请勿转载。