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


PHP Tag::displayTo方法代碼示例

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


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

示例1: editAction

 public function editAction($id)
 {
     $request = $this->request;
     if (!$request->isPost()) {
         $producttypes = ProductTypes::findFirst(array('id=:id:', 'bind' => array('id' => $id)));
         if (!$producttypes) {
             $this->flash->error("Product type to edit was not found");
             return $this->forward("producttypes/index");
         }
         $this->view->setVar("id", $producttypes->id);
         Tag::displayTo("id", $producttypes->id);
         Tag::displayTo("name", $producttypes->name);
     }
 }
開發者ID:netstu,項目名稱:invo,代碼行數:14,代碼來源:ProducttypesController.php

示例2: editAction

 public function editAction($id)
 {
     $request = $this->request;
     if (!$request->isPost()) {
         $categories = Categories::findFirst(array('id = :id:', 'bind' => array('id' => $id)));
         if (!$categories) {
             $this->flash->error("The category was not found");
             return $this->dispatcher->forward(array("controller" => "categories", "action" => "index"));
         }
         $this->view->setVar("id", $categories->id);
         Tag::displayTo("id", $categories->id);
         Tag::displayTo("name", $categories->name);
         Tag::displayTo("slug", $categories->slug);
     }
 }
開發者ID:alawnchen,項目名稱:blog-tutorial,代碼行數:15,代碼來源:CategoriesController.php

示例3: editAction

 public function editAction($id)
 {
     $request = $this->request;
     if (!$request->isPost()) {
         $companies = Companies::findFirst(array('id=:id:', 'bind' => array('id' => $id)));
         if (!$companies) {
             $this->flash->error("companies was not found");
             return $this->forward("companies/index");
         }
         $this->view->setVar("id", $companies->id);
         Tag::displayTo("id", $companies->id);
         Tag::displayTo("name", $companies->name);
         Tag::displayTo("telephone", $companies->telephone);
         Tag::displayTo("address", $companies->address);
         Tag::displayTo("city", $companies->city);
     }
 }
開發者ID:netstu,項目名稱:invo,代碼行數:17,代碼來源:CompaniesController.php

示例4: editAction

 public function editAction($id)
 {
     $request = $this->request;
     if (!$request->isPost()) {
         $id = $this->filter->sanitize($id, array("int"));
         $counts = Counts::findFirst('id="' . $id . '"');
         if (!$counts) {
             $this->flash->error("counts was not found");
             return $this->dispatcher->forward(array("controller" => "counts", "action" => "index"));
         }
         $this->view->setVar("id", $counts->id);
         Tag::displayTo("id", $counts->id);
         Tag::displayTo("links_id", $counts->links_id);
         Tag::displayTo("value", $counts->value);
         Tag::displayTo("visit_date", $counts->visit_date);
         Tag::displayTo("visitor_ip", $counts->visitor_ip);
     }
 }
開發者ID:spiritwild,項目名稱:Url-Shortener,代碼行數:18,代碼來源:CountsController.php

示例5: editAction

 public function editAction($id)
 {
     return true;
     $request = $this->request;
     if (!$request->isPost()) {
         $id = $this->filter->sanitize($id, array("int"));
         $links = Links::findFirst('id="' . $id . '"');
         if (!$links) {
             $this->flash->error("links was not found");
             return $this->dispatcher->forward(array("controller" => "links", "action" => "index"));
         }
         $this->view->setVar("id", $links->id);
         Tag::displayTo("id", $links->id);
         Tag::displayTo("token", $links->token);
         Tag::displayTo("longurl", $links->longurl);
         Tag::displayTo("visitor_count", $links->visitor_count);
     }
 }
開發者ID:spiritwild,項目名稱:Url-Shortener,代碼行數:18,代碼來源:LinksController.php

示例6: editAction

 public function editAction($id)
 {
     $request = $this->request;
     if (!$request->isPost()) {
         $id = $this->filter->sanitize($id, array("int"));
         $products = Products::findFirst('id="' . $id . '"');
         if (!$products) {
             $this->flash->error("products was not found");
             return $this->forward("products/index");
         }
         $this->view->setVar("id", $products->id);
         Tag::displayTo("id", $products->id);
         Tag::displayTo("product_types_id", $products->product_types_id);
         Tag::displayTo("name", $products->name);
         Tag::displayTo("price", $products->price);
         Tag::displayTo("active", $products->active);
         $this->view->setVar("productTypes", ProductTypes::find());
     }
 }
開發者ID:Rho1and0,項目名稱:invo,代碼行數:19,代碼來源:ProductsController.php

示例7: editAction

 public function editAction($id)
 {
     $request = $this->request;
     if (!$request->isPost()) {
         $id = $this->filter->sanitize($id, array("int"));
         $user = User::findFirst('id="' . $id . '"');
         if (!$user) {
             $this->flash->error("user was not found");
             return $this->dispatcher->forward(array("controller" => "user", "action" => "index"));
         }
         $this->view->setVar("id", $user->id);
         Tag::displayTo("id", $user->id);
         Tag::displayTo("username", $user->username);
         Tag::displayTo("fullname", $user->fullname);
         Tag::displayTo("email", $user->email);
         Tag::displayTo("password", $user->password);
         Tag::displayTo("role", $user->role);
         Tag::displayTo("active", $user->active);
         Tag::displayTo("last_login_time", $user->last_login_time);
         Tag::displayTo("create_time", $user->create_time);
         Tag::displayTo("update_time", $user->update_time);
     }
 }
開發者ID:devsnippet,項目名稱:city_site,代碼行數:23,代碼來源:UserController.php

示例8: editAction

 public function editAction($id = null)
 {
     if (!$this->request->isPost() && !$this->request->isAjax()) {
         $id = $this->filter->sanitize($id, array("int"));
         $model = $this->loadModel($id);
         $this->view->setVar("id", $model->id);
         Tag::displayTo("name", $model->name);
     } elseif ($this->request->isPost() && !$this->request->isAjax()) {
         $id = $this->request->getPost('id', 'int');
         $model = $this->loadModel($id);
         if (!$model->update($_POST)) {
             foreach ($model->getMessages() as $message) {
                 $this->flashSession->error((string) $message->getMessage());
                 //echo var_dump($message->getType());
                 //echo var_dump($message->getMessage());
             }
             return $this->response->redirect('backend/articleCategories/edit/' . $model->id);
         } else {
             $this->flashSession->success("Статья удачно обновлена");
             return $this->response->redirect("backend/articleCategories");
         }
     }
 }
開發者ID:devsnippet,項目名稱:city_site,代碼行數:23,代碼來源:ArticleCategoriesController.php

示例9: editAction

 public function editAction($id)
 {
     $request = $this->request;
     if (!$request->isPost()) {
         $id = $this->filter->sanitize($id, array("int"));
         $insertion = Insertion::findFirst('id="' . $id . '"');
         if (!$insertion) {
             $this->flash->error("insertion was not found");
             return $this->dispatcher->forward(array("controller" => "insertion", "action" => "index"));
         }
         $this->view->setVar("id", $insertion->id);
         Tag::displayTo("id", $insertion->id);
         Tag::displayTo("category", $insertion->category);
         Tag::displayTo("body", $insertion->body);
         Tag::displayTo("status", $insertion->status);
         Tag::displayTo("price_range", $insertion->price_range);
         Tag::displayTo("price", $insertion->price);
         Tag::displayTo("buy_sell", $insertion->buy_sell);
         Tag::displayTo("create_user_id", $insertion->create_user_id);
         Tag::displayTo("update_user_id", $insertion->update_user_id);
         Tag::displayTo("create_time", $insertion->create_time);
         Tag::displayTo("update_time", $insertion->update_time);
     }
 }
開發者ID:devsnippet,項目名稱:city_site,代碼行數:24,代碼來源:InsertionController.php

示例10: editAction

 public function editAction($id = null)
 {
     $this->assets->addCss('css/select2.css');
     $this->assets->addJs('js/select2.js');
     if (!$this->request->isPost() && !$this->request->isAjax()) {
         $id = $this->filter->sanitize($id, array("int"));
         $model = $this->loadModel($id);
         if (!$model) {
             $this->flashSession->error("Новость не найдена");
             $this->response->redirect("backend/posts/index");
         }
         $this->view->setVar("id", $model->id);
         $this->view->setVar('tags', \Models\Tags::getTagsForSelect());
         Tag::displayTo("id", $model->id);
         Tag::displayTo("title", $model->title);
         Tag::displayTo("body", $model->body);
         Tag::displayTo("status", $model->status);
         Tag::displayTo("tags", $model->tags);
     } elseif ($this->request->isPost() && !$this->request->isAjax()) {
         $auth = $this->session->get('auth');
         if (!$auth) {
             return $this->response->redirect();
         }
         $id = $this->request->getPost('id', 'int');
         $model = $this->loadModel($id);
         if (!$model) {
             $this->flashSession->error("Ничего не найдено");
             $this->response->redirect("backend/posts/index");
         }
         $model->author_id = $auth['id'];
         if (!$model->update($_POST)) {
             foreach ($model->getMessages() as $message) {
                 $this->flashSession->error((string) $message->getMessage());
                 //echo var_dump($message->getType());
                 //echo var_dump($message->getMessage());
             }
             return $this->response->redirect('backend/posts/edit/' . $model->id);
         } else {
             $this->flashSession->success("Запись удачно обновлена");
             return $this->response->redirect("backend/posts");
         }
     }
 }
開發者ID:devsnippet,項目名稱:city_site,代碼行數:43,代碼來源:PostsController.php

示例11: testFieldParameter

 /**
  * Runs the test for a Tag::$function with $options
  *
  * @param string  $function
  * @param mixed   $options
  * @param string  $expected
  * @param boolean $xhtml
  * @param string  $set
  */
 public function testFieldParameter($function, $options, $expected, $xhtml, $set = '')
 {
     Tag::resetInput();
     if ($xhtml) {
         Tag::setDocType(Tag::XHTML10_STRICT);
         $expected .= ' />';
     } else {
         Tag::setDocType(Tag::HTML5);
         $expected .= '>';
     }
     if ($set) {
         Tag::displayTo('x_name', 'x_value');
     }
     $actual = Tag::$function($options);
     if ($set) {
         Tag::$set('x_name', '');
     }
     $this->assertEquals($expected, $actual);
 }
開發者ID:phalcon,項目名稱:cphalcon,代碼行數:28,代碼來源:Unit.php

示例12: editAction

 public function editAction($id)
 {
     $this->assets->addJs('js/jquery.MultiFile.pack.js');
     if (!$this->request->isPost() && !$this->request->isAjax()) {
         $id = $this->filter->sanitize($id, array("int"));
         $model = $this->loadModel($id);
         if (!$model) {
             $this->flashSession->error("Новость не найдена");
             $this->response->redirect("backend/news/index");
         }
         $this->view->setVar("id", $model->id);
         $this->view->setVar('images', $model->getImages());
         Tag::displayTo("id", $model->id);
         Tag::displayTo("title", $model->title);
         Tag::displayTo("body", $model->body);
         Tag::displayTo("status", $model->status);
     } elseif ($this->request->isPost() && !$this->request->isAjax()) {
         $auth = $this->session->get('auth');
         if (!$auth) {
             return $this->response->redirect();
         }
         $id = $this->request->getPost('id', 'int');
         $model = $this->loadModel($id);
         if (!$model) {
             $this->flashSession->error("Новость не найдена");
             $this->response->redirect("backend/news/index");
         }
         $model->update_user_id = $auth['id'];
         if (!$model->update($_POST)) {
             foreach ($model->getMessages() as $message) {
                 $this->flashSession->error((string) $message->getMessage());
                 //echo var_dump($message->getType());
                 //echo var_dump($message->getMessage());
             }
             return $this->response->redirect('backend/news/edit/' . $model->id);
         } else {
             $this->SaveImages($model);
             $this->flashSession->success("Новость удачно обновлена");
             return $this->response->redirect("backend/news");
         }
     }
 }
開發者ID:devsnippet,項目名稱:city_site,代碼行數:42,代碼來源:NewsController.php

示例13: changetypesAction

 public function changetypesAction($id)
 {
     if ($id) {
         $newstype = Newstype::findFirst("id =" . $id);
         Tag::displayTo("id", $newstype->id);
         Tag::displayTo("name", $newstype->name);
     } else {
         $this->flash->error("錯誤");
     }
 }
開發者ID:lookingatsky,項目名稱:zhonghewanbang,代碼行數:10,代碼來源:OperateController.php

示例14: accountAction

 public function accountAction($id)
 {
     $id = $this->filter->sanitize($id, array("int"));
     $userInfo = Users::findFirst('did = "' . $id . '"');
     if (!$userInfo) {
         $this->flash->notice("還木有帳號,請創建並保存");
         $this->view->setVar("aid", $id);
         Tag::displayTo("did", $id);
         Tag::setDefault('email', ' ');
         Tag::setDefault('password', '');
         $this->view->pick("session/register");
     } else {
         $this->view->setVar("aid", $id);
         Tag::displayTo("id", $userInfo->id);
         Tag::displayTo("username", $userInfo->username);
         Tag::displayTo("name", $userInfo->name);
         Tag::displayTo("email", $userInfo->email);
     }
 }
開發者ID:lookingatsky,項目名稱:zhonghewanbang,代碼行數:19,代碼來源:CompaniesController.php

示例15: newtypesAction

 public function newtypesAction($id)
 {
     Tag::displayTo("fid", $id);
     $this->view->form = $this->getForm();
 }
開發者ID:lookingatsky,項目名稱:zhonghewanbang,代碼行數:5,代碼來源:ProducttypesController.php


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