当前位置: 首页>>代码示例>>PHP>>正文


PHP Forge::textarea方法代码示例

本文整理汇总了PHP中Forge::textarea方法的典型用法代码示例。如果您正苦于以下问题:PHP Forge::textarea方法的具体用法?PHP Forge::textarea怎么用?PHP Forge::textarea使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Forge的用法示例。


在下文中一共展示了Forge::textarea方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Forge

 function no_group_test()
 {
     $form = new Forge("test/controller", "", "post", array("id" => "g-test-group-form"));
     $form->input("title")->label(t("Title"));
     $form->textarea("description")->label(t("Text Area"));
     $form->submit("")->value(t("Submit"));
     $csrf = access::csrf_token();
     $expected = "<form action=\"http://./index.php/test/controller\" method=\"post\" " . "id=\"g-test-group-form\">\n" . "<input type=\"hidden\" name=\"csrf\" value=\"{$csrf}\"  />" . "  <ul>\n" . "  <li>\n" . "    <label for=\"title\" >Title</label>\n" . "    <input type=\"text\" name=\"title\" value=\"\" " . "class=\"textbox\"  />\n" . "  </li>\n" . "  <li>\n" . "    <label for=\"description\" >Text Area</label>\n" . "    <textarea name=\"description\" rows=\"\" cols=\"\" " . "class=\"textarea\" ></textarea>\n" . "  </li>\n" . "  <li>\n" . "    <input type=\"submit\" value=\"Submit\" class=\"submit\"  />\n" . "  </li>\n" . "  </ul>\n" . "</form>";
     $this->assert_same($expected, (string) $form);
 }
开发者ID:andyst,项目名称:gallery3,代码行数:10,代码来源:DrawForm_Test.php

示例2: Forge

 static function get_tag_form($itemids)
 {
     $tagPane = new Forge("organize/__FUNCTION__", "", "post", array("id" => "gEditTags", "ref" => "edit_tags"));
     $tagPane->hidden("item")->value(implode("|", $itemids));
     $item_count = count($itemids);
     $ids = implode(", ", $itemids);
     $tags = Database::instance()->query("SELECT t.name, COUNT(it.item_id) as count\n         FROM {items_tags} it, {tags} t\n        WHERE it.tag_id = t.id\n          AND it.item_id in({$ids})\n       GROUP BY it.tag_id\n       ORDER BY t.name ASC");
     $taglist = array();
     foreach ($tags as $tag) {
         $taglist[] = $tag->name . ($item_count > $tag->count ? "*" : "");
     }
     $taglist = implode("; ", $taglist);
     $tagPane->textarea("tags")->label(t("Tags"))->value($taglist);
     return $tagPane;
 }
开发者ID:xafr,项目名称:gallery3,代码行数:15,代码来源:organize.php

示例3: Forge

 static function get_tag_form($itemids)
 {
     $tagPane = new Forge("organize/__FUNCTION__", "", "post", array("id" => "gEditTags", "ref" => "edit_tags"));
     $tagPane->hidden("item")->value(implode("|", $itemids));
     $item_count = count($itemids);
     $ids = implode(", ", $itemids);
     // Lame stopgap security check.  This code is going to get rewritten anyway.
     foreach ($itemids as $id) {
         $item = ORM::factory("item", $id);
         access::required("view", $item);
         access::required("edit", $item);
     }
     $tags = Database::instance()->query("SELECT t.name, COUNT(it.item_id) as count\n         FROM {items_tags} it, {tags} t\n        WHERE it.tag_id = t.id\n          AND it.item_id in({$ids})\n       GROUP BY it.tag_id\n       ORDER BY t.name ASC");
     $taglist = array();
     foreach ($tags as $tag) {
         $taglist[] = $tag->name . ($item_count > $tag->count ? "*" : "");
     }
     $taglist = implode("; ", $taglist);
     $tagPane->textarea("tags")->label(t("Tags"))->value($taglist);
     return $tagPane;
 }
开发者ID:hiwilson,项目名称:gallery3,代码行数:21,代码来源:organize.php


注:本文中的Forge::textarea方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。