def getCSSClass(klass=None, error=None, required=None, classPattern=
    '%(class)s', errorPattern='%(class)s-error', requiredPattern=
    '%(class)s-required'):
    """Setup given css class (klass) with error and required postfix

        If no klass name is given the widget.wrapper class name/names get used.
        It is also possible if more then one (empty space separated) names
        are given as klass argument.

        This method can get used from your form or widget template or widget
        layout template without to re-implement the widget itself just because
        you a different CSS class concept.

        """
