本文整理汇总了PHP中Phalcon\Tag::tagHtmlClose方法的典型用法代码示例。如果您正苦于以下问题:PHP Tag::tagHtmlClose方法的具体用法?PHP Tag::tagHtmlClose怎么用?PHP Tag::tagHtmlClose使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Phalcon\Tag
的用法示例。
在下文中一共展示了Tag::tagHtmlClose方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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());
}
示例2: 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;
}
示例3: tagHtmlClose
public static function tagHtmlClose($tagName, $useEol = false)
{
return parent::tagHtmlClose($tagName, $useEol);
}
示例4: testTagHtmlCloseEol
/**
* Tests the tagHtmlClose with EOL
*
* @author Nikos Dimopoulos <nikos@phalconphp.com>
* @since 2013-04-22
*/
public function testTagHtmlCloseEol()
{
$name = 'canvas';
$expected = '</canvas>' . PHP_EOL;
$actual = \Phalcon\Tag::tagHtmlClose($name, true);
$this->assertEquals($expected, $actual, sprintf($this->message, 'tagHtml with options array'));
}
示例5: 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");
示例6: 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);
}
示例7: 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');
}