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


PHP Tag::tagHtml方法代码示例

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


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

示例1: testIdeGenerator

 public function testIdeGenerator()
 {
     Widget::define('hello', function (array $parameters, &$null = null, $true = true, $false = false, $const = PHP_EOL, \stdClass $class = null, callable $callable = null) {
         $innerHtml = isset($parameters['innerHtml']) ? $parameters['innerHtml'] : '';
         unset($parameters['innerHtml']);
         return Tag::tagHtml('hello', $parameters) . $innerHtml . Tag::tagHtmlClose('hello');
     });
     $expected = '    public static function hello(array $parameters, &$null = null, ' . '$true = true, $false = false, $const = PHP_EOL, stdClass $class = null, callable $callable = null) {}';
     $this->assertEquals($expected, Widget::ideHelperGenerator());
 }
开发者ID:phwoolcon,项目名称:phwoolcon,代码行数:10,代码来源:WidgetTest.php

示例2: __toString

 public function __toString()
 {
     $html = '';
     if (count($this->_register) == 0) {
         return $html;
     }
     foreach ($this->_register as $tag) {
         $html .= "\t" . \Phalcon\Tag::tagHtml('meta', $tag) . "\n";
     }
     return $html;
 }
开发者ID:joacub,项目名称:phalcony,代码行数:11,代码来源:HeadMeta.php

示例3: render

 public function render($attributes = NULL, $icon = NULL)
 {
     $icon = $icon ?: $this->_icon;
     $render = Tag::tagHtml('i', ['class' => 'pull-right']);
     $render .= ' ';
     $render .= Tag::tagHtmlClose('i');
     $render .= Tag::tagHtml('button', $this->prepareAttributes($attributes), FALSE, TRUE);
     $render .= $this->_name;
     $render .= Tag::tagHtml('i', ['class' => $icon]);
     $render .= Tag::tagHtmlClose('i');
     $render .= Tag::tagHtmlClose('button');
     return $render;
 }
开发者ID:denners777,项目名称:api-phalcon,代码行数:13,代码来源:Button.php

示例4: tagHtml

 public static function tagHtml($tagName, $parameters = NULL, $selfClose = NULL, $onlyStart = NULL, $useEol = NULL)
 {
     if ('province' == $tagName) {
         return self::province($parameters[0], $parameters[1], $parameters[2]);
     } else {
         if ('city' == $tagName) {
             return self::city($parameters[0], $parameters[1], $parameters[2], $parameters[3], $parameters[4]);
         } else {
             if ('county' == $tagName) {
                 return self::county($parameters[0], $parameters[1], $parameters[2], $parameters[3], $parameters[4]);
             } else {
                 if ('img_upload' == $tagName) {
                     return self::imageUpload($parameters);
                 } else {
                     if ('file_upload' == $tagName) {
                         return self::fileUpload($parameters);
                     } else {
                         if ('file_download' == $tagName) {
                             return self::fileDownload($parameters);
                         } else {
                             if ('province_name' == $tagName) {
                                 return self::provinceName($parameters);
                             } else {
                                 if ('city_name' == $tagName) {
                                     return self::cityName($parameters);
                                 } else {
                                     if ('county_name' == $tagName) {
                                         return self::countyName($parameters);
                                     } else {
                                         if ('enum_cell' == $tagName) {
                                             return self::enumCell($parameters);
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     return Tag::tagHtml($tagName, $parameters, $selfClose, $onlyStart, $useEol);
 }
开发者ID:healerkx,项目名称:AdminBuildr,代码行数:43,代码来源:AbTag.php

示例5: tagHtml

 public static function tagHtml($tagName, $parameters = null, $selfClose = false, $onlyStart = false, $useEol = false)
 {
     return parent::tagHtml($tagName, $parameters, $selfClose, $onlyStart, $useEol);
 }
开发者ID:mattvb91,项目名称:cphalcon,代码行数:4,代码来源:Tag.php

示例6: testTagHtmlWithArray

 /**
  * Tests the tagHtml with name parameter
  *
  * @author Nikos Dimopoulos <nikos@phalconphp.com>
  * @since  2013-04-22
  */
 public function testTagHtmlWithArray()
 {
     $name = 'canvas';
     $options = array('id' => 'canvas1', 'width' => 300, 'height' => 300, 'value' => '123');
     $expected = '<canvas id="canvas1" value="123" width="300" height="300"></canvas>';
     $actual = \Phalcon\Tag::tagHtml($name, $options);
     $this->assertEquals($expected, $actual, sprintf($this->message, 'tagHtml with options array'));
 }
开发者ID:lisong,项目名称:cphalcon,代码行数:14,代码来源:UnitTest.php

示例7: array

<?php

// Generate
// <canvas id="canvas1" width="300" class="cnvclass">
// This is my canvas
// </canvas>
echo \Phalcon\Tag::tagHtml("canvas", array("id" => "canvas1", "width" => "300", "class" => "cnvclass", false, true, true));
echo "This is my canvas";
echo \Phalcon\Tag::tagHtmlClose("canvas");
开发者ID:aodkrisda,项目名称:phalcon-code,代码行数:9,代码来源:tags-523.php

示例8: label

 /**
  * Display attribute name
  * @param string $attribute
  * @return string
  */
 public function label($attribute)
 {
     return Tag::tagHtml('label', ['class' => 'pull-left control-label']) . $this->model->getAttributeLabel($attribute) . Tag::tagHtmlClose('label', true);
 }
开发者ID:wataridori,项目名称:bphalcon,代码行数:9,代码来源:BForm.php

示例9: builtInLabel

 /**
  * Make a label element
  *
  * Required parameters:
  * $innerHtml
  * Optional parameters:
  * 'for', 'class', or other html attributes
  *
  * @param array  $parameters
  * @param string $innerHtml
  * @return string
  */
 protected static function builtInLabel(array $parameters, $innerHtml)
 {
     return Tag::tagHtml('label', $parameters, false, true) . $innerHtml . Tag::tagHtmlClose('label');
 }
开发者ID:phwoolcon,项目名称:phwoolcon,代码行数:16,代码来源:Widget.php


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