PHPackages                             sandrokeil/html-element - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. sandrokeil/html-element

ActiveLibrary[Templating &amp; Views](/categories/templating)

sandrokeil/html-element
=======================

Zend Framework view helper plugin to use html tags like objects and to render them.

2.0.0(8y ago)25.5k[1 issues](https://github.com/sandrokeil/HtmlElement/issues)BSD-3-ClausePHPPHP ^7.0

Since Jun 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/sandrokeil/HtmlElement)[ Packagist](https://packagist.org/packages/sandrokeil/html-element)[ Docs](https://github.com/sandrokeil/HtmlElement)[ RSS](/packages/sandrokeil-html-element/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (8)Versions (7)Used By (0)

HtmlElement view helper for Zend Framework
==========================================

[](#htmlelement-view-helper-for-zend-framework)

> You want HTML tags as objects?

> You want surefire generated HTML tags and HTML attributes?

> You want to generate HTML tags on the fly?

> This module comes to the rescue!

[![Build Status](https://camo.githubusercontent.com/57db01fb3c6fc11fc898a3bec6f267cc696ccaafb45d4d4918ed9b89208ac375/68747470733a2f2f7472617669732d63692e6f72672f73616e64726f6b65696c2f48746d6c456c656d656e742e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/sandrokeil/HtmlElement)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/33b17e0eadeb55cdbd147acc61513cd8252754f34b215a54fb95fe7d99c9e480/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f73616e64726f6b65696c2f48746d6c456c656d656e742f6261646765732f7175616c6974792d73636f72652e706e673f733d31376562666565366439383930643366343362656363636330383437343666656432666336373037)](https://scrutinizer-ci.com/g/sandrokeil/HtmlElement/)[![Coverage Status](https://camo.githubusercontent.com/dff77bb49d49230ab1cd082dfa6ba616b833fdb922229c4d2dc2c5e1c2099357/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f73616e64726f6b65696c2f48746d6c456c656d656e742f62616467652e706e67)](https://coveralls.io/r/sandrokeil/HtmlElement)[![HHVM Status](https://camo.githubusercontent.com/2cb08b6ca54763937be154491998052da1408578e6fcb873c2e1a1dee734fc4e/687474703a2f2f6868766d2e683463632e64652f62616467652f73616e64726f6b65696c2f68746d6c2d656c656d656e742e737667)](http://hhvm.h4cc.de/package/sandrokeil/html-element)[![SensioLabsInsight](https://camo.githubusercontent.com/2ab4ec27c936fd70e01efa209f076f40835ba4c72ae053e4de10138ef707b5ab/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f62653362386161632d646137622d346165312d613834322d3832666663613237313264302f6d696e692e706e67)](https://insight.sensiolabs.com/projects/be3b8aac-da7b-4ae1-a842-82ffca2712d0)[![Latest Stable Version](https://camo.githubusercontent.com/84fc88aad7be027b54ea6a1d76de6b53771d71cd3254b86d626380c14c622542/68747470733a2f2f706f7365722e707567782e6f72672f73616e64726f6b65696c2f68746d6c2d656c656d656e742f762f737461626c652e706e67)](https://packagist.org/packages/sandrokeil/html-element)[![Dependency Status](https://camo.githubusercontent.com/bde1a81dd12f67d553bc64c011cb62851381b863f9682e5bf3874ff11dd98ce5/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3533363135636339666530643037666136373030303063622f62616467652e706e67)](https://www.versioneye.com/user/projects/53615cc9fe0d07fa670000cb)[![Total Downloads](https://camo.githubusercontent.com/96b14d8468e3a49f2a7fd10828c09cb9de93cee2f55f91d2076771cb71231d9a/68747470733a2f2f706f7365722e707567782e6f72672f73616e64726f6b65696c2f68746d6c2d656c656d656e742f646f776e6c6f6164732e706e67)](https://packagist.org/packages/sandrokeil/html-element)[![License](https://camo.githubusercontent.com/36e2c2b2f1026bd02939f30edac461953550b20658672b28552c288a9d9c1042/68747470733a2f2f706f7365722e707567782e6f72672f73616e64726f6b65696c2f68746d6c2d656c656d656e742f6c6963656e73652e706e67)](https://packagist.org/packages/sandrokeil/html-element)

Zend Framework view helper plugin for generating HTML tags. Use HTML tags as objects and manipulate HTML attributes and values.

- **Well tested.** Besides unit tests and continuous integration/inspection this solution is also ready for production use.
- **Great foundations.** Based on [Zend Framework](https://github.com/zendframework) and [interop-config](https://github.com/sandrokeil/interop-config)
- **Every change is tracked**. Want to know whats new? Take a look at [CHANGELOG.md](CHANGELOG.md)
- **Listen to your ideas.** Have a great idea? Bring your tested pull request or open a new issue. See [CONTRIBUTING.md](CONTRIBUTING.md)

Installation
------------

[](#installation)

Installation of this module uses Composer. For Composer documentation, please refer to [getcomposer.org](http://getcomposer.org/).

Put the following into your composer.json

```
{
    "require": {
        "sandrokeil/html-element": "^2.0"
    }
}

```

Please register the `HtmlElement` view helper to your [Zend\\View plugin manager](https://zendframework.github.io/zend-view/helpers/advanced-usage/). You can use the `Sake\HtmlElement\Service\HtmlElementFactory` factory if you install [interop-config](https://github.com/sandrokeil/interop-config).

```
return [
   'view_helpers' => [
        'factories' => [
            \Sake\HtmlElement\View\Helper\HtmlElement::class => \Sake\HtmlElement\Service\HtmlElementFactory::class,
        ],
    ],
];
```

Documentation
-------------

[](#documentation)

The usage is easy. Here is an example how to use the view helper

```
