protected function _buildDataAttrs(array $param = array())
    {
        $return = '';
        foreach ($param as $data => $val) {
            $dKey = 'data-' . trim($data);

            if (is_object($val)) {
                $val = (array) $val;
            }

            if (is_array($val)) {
                $val = str_replace('"', '\'', json_encode($val));
                $return .= $this->_buildAttr($dKey, $val);
                continue;
            }

            $return .= $this->_buildAttr($dKey, $val);
        }

        return $return;
    }
protected function _buildDataAttrs(array $param = array())
    {
        $return = '';
        foreach ($param as $data => $val) {
            $dKey = 'data-' . trim($data);

            if (is_object($val)) {
                $val = (array) $val;
            }

            if (is_array($val)) {
                $val = str_replace('"', '\'', json_encode($val));
                $return .= $this->_buildAttr($dKey, $val);
                continue;
            }

            $return .= $this->_buildAttr($dKey, $val);
        }

        return $return;
    }
protected function _buildDataAttrs ( array $ param = array ( ) ) { $ return = '' ; foreach ( $ param as $ data => $ val ) { $ dKey = 'data-' . trim ( $ data ) ; if ( is_object ( $ val ) ) { $ val = ( array ) $ val ; } if ( is_array ( $ val ) ) { $ val = str_replace ( '"' , '\'' , json_encode ( $ val ) ) ; $ return .= $ this -> _buildAttr ( $ dKey , $ val ) ; continue ; } $ return .= $ this -> _buildAttr ( $ dKey , $ val ) ; } return $ return ; }
Build html data attributes.

@param array $param
@return null|string
Build html data attributes .