2021-03-17 1061次浏览

First stable version of Html package was tagged. The package could be used both along with Yii 3 or separately.

It is a handy library to generate HTML dynamically:

<?= Html::p()->class('float-right')->content(
    'Powered by ',
    Html::a(
        'Yii Framework',
        'https://www.yiiframework.com/',
        ['rel' => 'external']
    )
) ?>

It has a set of tag classes such as A , Input or Select . All these handle encoding well leaving less possibility for XSS. Moreover, there are compound widgets such as CheckboxList that make certain markup easier to describe.

For more detailed description and examples, check the README.

Similar to other Yii 3 packages, the quality standard is high: 100% test coverage, 100% mutation score, full Psalm static analysis. Everything running in a GitHub action.