protected function getCSSClassNames()
    {
        $classes = array('swat-form-field');

        if ($this->widget_class !== null) {
            $classes[] = $this->widget_class;
        }

        if ($this->display_messages && $this->hasMessage()) {
            $classes[] = 'swat-form-field-with-messages';
        }

        if ($this->required) {
            $classes[] = 'swat-required';
        }

        $classes = array_merge($classes, parent::getCSSClassNames());
        return $classes;
    }