public function getAttributes()
    {
        $id         = $this->getId();
        $attributes = $this->attributes;
        $class      = implode(' ', $this->getClass());
        if ($id) {
            $attributes['id'] = $this->normalizeId($id);
        }
        if ($class) {
            $attributes['class'] = $class;
        }
        return $attributes;
    }