yii-html-tag Builder to create a html tag, an object-oriented approach

  1. Installation
  2. Usage examples

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>
0 0
1 follower
145 downloads
Yii Version: 1.1
License: MIT
Category: User Interface
Developed by: Petr.Grishin
Created on: Jun 2, 2014
Last updated: 10 years ago

Downloads

show all

Related Extensions