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


PHP Tag::textField方法代码示例

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


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

示例1: render

 /**
  * Renders the element widget
  *
  * @param array|null $attributes
  * @return string
  * @throws Exception
  */
 public function render($attributes = null)
 {
     if (is_array($attributes) === false && is_null($attributes) === false) {
         throw new Exception('Invalid parameter type.');
     }
     return Tag::textField($this->prepareAttributes($attributes));
 }
开发者ID:aisuhua,项目名称:phalcon-php,代码行数:14,代码来源:Text.php

示例2: registryFunctions

 /**
  * Registers common function in Twig
  *
  * @param \Phalcon\Mvc\ViewInterface $view
  * @param \Phalcon\DiInterface       $di
  * @param array                      $userFunctions
  */
 protected function registryFunctions($view, DiInterface $di, $userFunctions = array())
 {
     $options = array('is_safe' => array('html'));
     $functions = array(new \Twig_SimpleFunction('content', function () use($view) {
         return $view->getContent();
     }, $options), new \Twig_SimpleFunction('partial', function ($partialPath) use($view) {
         return $view->partial($partialPath);
     }, $options), new \Twig_SimpleFunction('linkTo', function ($parameters, $text = null) {
         return \Phalcon\Tag::linkTo($parameters, $text);
     }, $options), new \Twig_SimpleFunction('textField', function ($parameters) {
         return \Phalcon\Tag::textField($parameters);
     }, $options), new \Twig_SimpleFunction('passwordField', function ($parameters) {
         return \Phalcon\Tag::passwordField($parameters);
     }, $options), new \Twig_SimpleFunction('hiddenField', function ($parameters) {
         return \Phalcon\Tag::hiddenField($parameters);
     }, $options), new \Twig_SimpleFunction('fileField', function ($parameters) {
         return \Phalcon\Tag::fileField($parameters);
     }, $options), new \Twig_SimpleFunction('checkField', function ($parameters) {
         return \Phalcon\Tag::checkField($parameters);
     }, $options), new \Twig_SimpleFunction('radioField', function ($parameters) {
         return \Phalcon\Tag::radioField($parameters);
     }, $options), new \Twig_SimpleFunction('submitButton', function ($parameters) {
         return \Phalcon\Tag::submitButton($parameters);
     }, $options), new \Twig_SimpleFunction('selectStatic', function ($parameters, $data = array()) {
         return \Phalcon\Tag::selectStatic($parameters, $data);
     }, $options), new \Twig_SimpleFunction('select', function ($parameters, $data = array()) {
         return \Phalcon\Tag::select($parameters, $data);
     }, $options), new \Twig_SimpleFunction('textArea', function ($parameters) {
         return \Phalcon\Tag::textArea($parameters);
     }, $options), new \Twig_SimpleFunction('form', function ($parameters = array()) {
         return \Phalcon\Tag::form($parameters);
     }, $options), new \Twig_SimpleFunction('endForm', function () {
         return \Phalcon\Tag::endForm();
     }, $options), new \Twig_SimpleFunction('getTitle', function () {
         return \Phalcon\Tag::getTitle();
     }, $options), new \Twig_SimpleFunction('stylesheetLink', function ($parameters = null, $local = true) {
         return \Phalcon\Tag::stylesheetLink($parameters, $local);
     }, $options), new \Twig_SimpleFunction('javascriptInclude', function ($parameters = null, $local = true) {
         return \Phalcon\Tag::javascriptInclude($parameters, $local);
     }, $options), new \Twig_SimpleFunction('image', function ($parameters) {
         return \Phalcon\Tag::image($parameters);
     }, $options), new \Twig_SimpleFunction('friendlyTitle', function ($text, $separator = null, $lowercase = true) {
         return \Phalcon\Tag::friendlyTitle($text, $separator, $lowercase);
     }, $options), new \Twig_SimpleFunction('getDocType', function () {
         return \Phalcon\Tag::getDocType();
     }, $options), new \Twig_SimpleFunction('getSecurityToken', function () use($di) {
         return $di->get("security")->getToken();
     }, $options), new \Twig_SimpleFunction('getSecurityTokenKey', function () use($di) {
         return $di->get("security")->getTokenKey();
     }, $options), new \Twig_SimpleFunction('url', function ($route) use($di) {
         return $di->get("url")->get($route);
     }, $options));
     if (!empty($userFunctions)) {
         $functions = array_merge($functions, $userFunctions);
     }
     foreach ($functions as $function) {
         $this->twig->addFunction($function);
     }
 }
开发者ID:lisong,项目名称:incubator,代码行数:66,代码来源:Twig.php

示例3: textField

 public static function textField($parameters)
 {
     if (self::isAbFormField($parameters)) {
         $view = KxApplication::current()->view;
         $itemViewMode = $view->getVar('itemViewMode');
         return AbTag::formTextField($parameters, $itemViewMode);
     }
     return Tag::textField($parameters);
 }
开发者ID:healerkx,项目名称:AdminBuildr,代码行数:9,代码来源:AbTag.php

示例4: form

 /**
  * Backend form
  *
  * @return string
  */
 public function form()
 {
     $title = isset($this->options->title) ? $this->options->title : "";
     $content = isset($this->options->value) ? $this->options->value : "";
     $form = '<p><label for="' . $this->getFieldId('title') . '">' . __('gb_title') . '</label>';
     $form .= Tag::textField([$this->getFieldName('title'), 'class' => 'form-control input-sm', 'value' => $title]);
     $form .= '</p>';
     $form .= '<p><label for="' . $this->getFieldId('value') . '">' . __('w_custom_html_form_label_content') . '</label><br/>';
     $form .= Tag::textArea([$this->getFieldName('value'), 'class' => 'form-control input-sm', 'value' => $content]);
     $form .= '</p>';
     return $form;
 }
开发者ID:kimthangatm,项目名称:zcms,代码行数:17,代码来源:CustomHtml.php

示例5: registryFunctions

 /**
  * Registers common function in Twig
  *
  * @param \Phalcon\Mvc\ViewInterface $view
  */
 private function registryFunctions($view)
 {
     $options = array('is_safe' => array('html'));
     $functions = array(new \Twig_SimpleFunction('content', function () use($view) {
         return $view->getContent();
     }, $options), new \Twig_SimpleFunction('partial', function ($partialPath) use($view) {
         return $view->partial($partialPath);
     }, $options), new \Twig_SimpleFunction('linkTo', function ($parameters, $text = null) {
         return \Phalcon\Tag::linkTo($parameters, $text);
     }, $options), new \Twig_SimpleFunction('textField', function ($parameters) {
         return \Phalcon\Tag::textField($parameters);
     }, $options), new \Twig_SimpleFunction('passwordField', function ($parameters) {
         return \Phalcon\Tag::passwordField($parameters);
     }, $options), new \Twig_SimpleFunction('hiddenField', function ($parameters) {
         return \Phalcon\Tag::hiddenField($parameters);
     }, $options), new \Twig_SimpleFunction('fileField', function ($parameters) {
         return \Phalcon\Tag::fileField($parameters);
     }, $options), new \Twig_SimpleFunction('checkField', function ($parameters) {
         return \Phalcon\Tag::checkField($parameters);
     }, $options), new \Twig_SimpleFunction('radioField', function ($parameters) {
         return \Phalcon\Tag::radioField($parameters);
     }, $options), new \Twig_SimpleFunction('submitButton', function ($parameters) {
         return \Phalcon\Tag::submitButton($parameters);
     }, $options), new \Twig_SimpleFunction('selectStatic', function ($parameters, $data = []) {
         return \Phalcon\Tag::selectStatic($parameters, $data);
     }, $options), new \Twig_SimpleFunction('select', function ($parameters, $data = []) {
         return \Phalcon\Tag::select($parameters, $data);
     }, $options), new \Twig_SimpleFunction('textArea', function ($parameters) {
         return \Phalcon\Tag::textArea($parameters);
     }, $options), new \Twig_SimpleFunction('form', function ($parameters = []) {
         return \Phalcon\Tag::form($parameters);
     }, $options), new \Twig_SimpleFunction('endForm', function () {
         return \Phalcon\Tag::endForm();
     }, $options), new \Twig_SimpleFunction('getTitle', function () {
         return \Phalcon\Tag::getTitle();
     }, $options), new \Twig_SimpleFunction('getTitle', function () {
         return \Phalcon\Tag::getTitle();
     }, $options), new \Twig_SimpleFunction('stylesheetLink', function ($parameters = null, $local = true) {
         return \Phalcon\Tag::stylesheetLink($parameters, $local);
     }, $options), new \Twig_SimpleFunction('javascriptInclude', function ($parameters = null, $local = true) {
         return \Phalcon\Tag::javascriptInclude($parameters, $local);
     }, $options), new \Twig_SimpleFunction('image', function ($parameters) {
         return \Phalcon\Tag::image($parameters);
     }, $options), new \Twig_SimpleFunction('friendlyTitle', function ($text, $separator = null, $lowercase = true) {
         return \Phalcon\Tag::friendlyTitle($text, $separator, $lowercase);
     }, $options), new \Twig_SimpleFunction('getDocType', function () {
         return \Phalcon\Tag::getDocType();
     }, $options));
     foreach ($functions as $function) {
         $this->_twig->addFunction($function);
     }
 }
开发者ID:tashik,项目名称:phalcon_core,代码行数:57,代码来源:Twig.php

示例6: render

 /**
  * Renders the element widget
  *
  * @param array $attributes
  * @return string
  */
 public function render($attributes = null)
 {
     if (isset($attributes['class'])) {
         $attributes['class'] .= ' date-picker';
         if (strpos($attributes['class'], 'form-control') !== false) {
             $attributes['class'] .= ' form-control';
         }
     } else {
         $attributes['class'] = 'form-control date-picker';
     }
     $attributes['data-date-format'] = 'dd-mm-yyyy';
     return Tag::textField($this->prepareAttributes($attributes));
 }
开发者ID:kimthangatm,项目名称:zcms,代码行数:19,代码来源:Date.php

示例7: form

 /**
  * @return string
  */
 public function form()
 {
     $title = isset($this->options->title) ? $this->options->title : "";
     $slide_show_id = isset($this->options->slide_show_id) ? $this->options->slide_show_id : "";
     $form = '<p><label for="' . $this->getFieldId('title') . '">' . __('gb_title') . '</label>';
     $form .= Tag::textField([$this->getFieldName('title'), 'class' => 'form-control input-sm', 'value' => $title]);
     $form .= '</p>';
     $form .= '<p><label for="' . $this->getFieldId('slide_show_id') . '">' . __('w_slide_show_form_id_slide_show') . '</label><br/>';
     //Get all slide show
     $slideShows = SlideShows::find(['conditions' => 'published = 1', 'order' => 'slide_show_id ASC']);
     $form .= Tag::select([$this->getFieldName('slide_show_id'), $slideShows, 'using' => ['slide_show_id', 'title'], 'class' => 'form-control input-sm', 'value' => $slide_show_id]);
     $form .= '</p>';
     return $form;
 }
开发者ID:kimthangatm,项目名称:zcms,代码行数:17,代码来源:slideshow.php

示例8: form

 /**
  * Admin widget form
  *
  * @return string
  */
 public function form()
 {
     $menu_left = isset($this->options->menu_left) ? $this->options->menu_left : '';
     $menu_right = isset($this->options->menu_right) ? $this->options->menu_right : '';
     $title = isset($this->options->title) ? $this->options->title : '';
     $form = '<p><label for="' . $this->getFieldId('title') . '">' . __('gb_title') . '</label>';
     $form .= Tag::textField([$this->getFieldName('title'), 'class' => 'form-control input-sm', 'value' => $title]);
     $form .= '</p>';
     $menuTypeAvailable = MenuTypes::find(['order' => 'name ASC']);
     $form .= '<p><label for="' . $this->getFieldId('menu_left') . '">' . __('w_menu_form_label_select_menu_left') . '</label>';
     $form .= Tag::select([$this->getFieldName('menu_left'), $menuTypeAvailable, 'using' => ['menu_type_id', 'name'], 'class' => 'form-control input-sm', 'value' => $menu_left, 'usingEmpty' => true]);
     $form .= '</p>';
     $form .= '<p><label for="' . $this->getFieldId('menu_left') . '">' . __('w_menu_form_label_select_menu_right') . '</label>';
     $form .= Tag::select([$this->getFieldName('menu_right'), $menuTypeAvailable, 'using' => ['menu_type_id', 'name'], 'class' => 'form-control input-sm', 'value' => $menu_right, 'usingEmpty' => true]);
     $form .= '</p>';
     return $form;
 }
开发者ID:kimthangatm,项目名称:zcms,代码行数:22,代码来源:MenuBootstrap.php

示例9:

<?php

use Phalcon\Tag;
?>

<!-- Sending the form by method POST -->
<?php 
echo Tag::form("products/search");
?>
<label for="q">Search:</label>
<?php 
echo Tag::textField("q");
echo Tag::submitButton("Search");
?>
</form>

<!-- Specyfing another method or attributes for the FORM tag -->
<?php 
echo Tag::form(array("products/search", "method" => "get"));
?>
<label for="q">Search:</label>
<?php 
echo Tag::textField("q");
echo Tag::submitButton("Search");
?>
</form>

开发者ID:aodkrisda,项目名称:phalcon-code,代码行数:26,代码来源:tags-121.php

示例10:

<?php

use Phalcon\Tag;
?>
<section>
    <header>
        <h1>搜索</h1>
    </header>
    <form action="/search" method="post">
        <p>
            <label for="search">
                <?php 
echo Tag::textField(['search', 'class' => 'search', 'autofocus' => 'true']);
?>
            </label>
        </p>

        <p>
            <?php 
echo Tag::submitButton(['submitSearch', 'class' => 'submitSearch', 'value' => '搜索']);
?>
        </p>
        <img src="/a.jpg" >
    </form>
</section>
开发者ID:justforleo,项目名称:phalcon-cmf,代码行数:25,代码来源:_library_webserver_documents_pro_app_controllers_frontend_views_index_index.volt.php

示例11: textField

 public static function textField($parameters)
 {
     return parent::textField($parameters);
 }
开发者ID:mattvb91,项目名称:cphalcon,代码行数:4,代码来源:Tag.php

示例12: testTextDisplayToElementNotPresentXHTML

 /**
  * Tests textField with displayTo to an non existent element
  *
  * @author Nikos Dimopoulos <nikos@phalconphp.com>
  * @since  2012-10-26
  */
 public function testTextDisplayToElementNotPresentXHTML()
 {
     \Phalcon\Tag::setDoctype(\Phalcon\Tag::XHTML10_STRICT);
     $options = array('some_field_name', 'class' => 'some_class', 'size' => '10');
     \Phalcon\Tag::displayTo('some_field', 'some_default_value');
     $expected = '<input type="text" id="some_field_name" name="some_field_name" value="" class="some_class" size="10" />';
     $actual = \Phalcon\Tag::textField($options);
     \Phalcon\Tag::displayTo('some_field', '');
     \Phalcon\Tag::setDoctype('');
     $this->assertEquals($expected, $actual, sprintf($this->message, 'XHTML textField with displayTo'));
 }
开发者ID:lisong,项目名称:cphalcon,代码行数:17,代码来源:UnitTest.php

示例13:

?>

<h2>Sign using this form</h2>

<?php 
echo Tag::form("signup/register");
?>

<p>
    <label for="name">Name</label>
    <?php 
echo Tag::textField("name");
?>
</p>

<p>
    <label for="name">E-Mail</label>
    <?php 
echo Tag::textField("email");
?>
</p>

<p>
    <?php 
echo Tag::submitButton("Register");
?>
</p>

</form>

开发者ID:aodkrisda,项目名称:phalcon-code,代码行数:29,代码来源:tutorial-285.php

示例14:

<?php

\Phalcon\Tag::textField(array("price", "size" => 20, "maxlength" => 30, "placeholder" => "Enter a price"));
?>

开发者ID:aodkrisda,项目名称:phalcon-code,代码行数:4,代码来源:tags-306.php


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