public function generateLabel()
    {
        if ($this->strLabel === '') {
            return '';
        }

        return sprintf(
            '<span %s>%s%s</span>',
            ('' !== $this->strClass ? ' class="' . $this->strClass . '"' : ''),
            $this->strLabel,
            ($this->required ? '<span class="mandatory">*</span>' : '')
        );
    }