public function editAction(Tags $tag) { if ($this->request->isPost() && $tag->update($this->request->getPost())) { return $this->success(); } $this->view->mytag = $tag; $this->view->form = myForm::buildFormFromModel($tag); }
public function editAction(Tags $tag) { if ($this->request->isPost()) { $data = $this->request->getPost(); $tag->update($data); $this->redirectByRoute(['for' => 'tags.show', 'tag' => $tag->id]); } $this->view->myTag = $tag; $this->view->form = $this->buildFormFromModel($tag); }
ossim_valid($bold, OSS_DIGIT, OSS_NULLABLE, 'illegal:' . _("bold")); if (ossim_error()) { die(ossim_error()); } if (GET('mode') == "insert") { if ($name == "") { $msg = _("You must type a name for the tab."); } else { $id = Tags::insert($conn, $name, $bgcolor, $fgcolor, $italic, $bold); $msg = _("Tag successfully created."); } } elseif (GET('mode') == "update" && $id != "") { if ($name == "") { $msg = _("You must type a name for the tab."); } else { Tags::update($conn, $id, $name, $bgcolor, $fgcolor, $italic, $bold); $msg = _("Tag successfully saved."); } $id = ""; } if (GET('delete') != "") { Tags::delete($conn, $delete); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title> <?php echo _("Control Panel"); ?> </title>
function onChangeTag() { if (!isset($_SESSION['CATS']) || empty($_SESSION['CATS'])) { echo 'CATS has lost your session data!'; return; } $tags = new Tags($this->_siteID); //$tags->update($_POST['tag_id'], $_POST['title'], $_POST['description']); $tags->update($_POST['tag_id'], $_POST['tag_title'], "-"); echo $_POST['tag_title']; return; }
/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update(Tags $tags, TagsRequest $request) { $tags->update($request->input()); return redirect()->route('admin.advertisement.index'); }
public function createtags() { try { $tags = new Tags($this->db, $this->entryid); $tags->update($this->tags); $tags->save(false); return true; } catch (Exception $e) { throw new ImageException('application error while setting tags', true); } }