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