Builder to create a html tag, an object-oriented approach
https://github.com/petrgrishin/yii-html-tag
Installation ¶
Add a dependency to your project's composer.json:
{
"require": {
"petrgrishin/yii-html-tag": "dev-master"
}
}
Usage examples ¶
Create tag ¶
use \PetrGrishin\HtmlTag\HtmlTag;
$tag = HtmlTag::create(HtmlTag::TAG_DIV, array('class' => 'content'))->begin();
$tag->addClass('well');
printf('content');
$tag->end();
// output: <div class="content well">content</div>
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.