Attributes whose values are of boolean type will be treated as
boolean attributes.
Attributes whose values are null will not be rendered.
The values of attributes will be HTML-encoded using
BaseHtml::encode.
The "data" attribute is specially handled when it is receiving an array value. In this case,
the array will be "expanded" and a list data attributes will be rendered. For example,
if
'data' => ['id' => 1, 'name' => 'yii'], then this will be rendered:
data-id="1" data-name="yii".
Additionally
'data' => ['params' => ['id' => 1, 'name' => 'yii'], 'status' => 'ok'] will be rendered as:
data-params='{"id":1,"name":"yii"}' data-status="ok".