public static function buildLabel($name, $label = '', $required = false)
        {
            $out = '';

            if (!empty($label)) {
                $class = 'control-label';
                $requiredLabel = '.req';
                $requiredSuffix = '<span class="required"><i class="icon-asterisk"></i></span>';
                $requiredPrefix = '';
                $requiredClass = 'labelrequired';

                if (false !== $required) {
                    $label = $requiredPrefix . $label . $requiredSuffix;
                    $class .= ' ' . $requiredClass;
                }

                $out .= static::label($name, $label, array('class' => $class));
            }

            return $out;
        }
public static function buildLabel($name, $label = '', $required = false)
        {
            $out = '';

            if (!empty($label)) {
                $class = 'control-label';
                $requiredLabel = '.req';
                $requiredSuffix = '<span class="required"><i class="icon-asterisk"></i></span>';
                $requiredPrefix = '';
                $requiredClass = 'labelrequired';

                if (false !== $required) {
                    $label = $requiredPrefix . $label . $requiredSuffix;
                    $class .= ' ' . $requiredClass;
                }

                $out .= static::label($name, $label, array('class' => $class));
            }

            return $out;
        }
public static function buildLabel ( $ name , $ label = '' , $ required = false ) { $ out = '' ; if ( ! empty ( $ label ) ) { $ class = 'control-label' ; $ requiredLabel = '.req' ; $ requiredSuffix = '<span class="required"><i class="icon-asterisk"></i></span>' ; $ requiredPrefix = '' ; $ requiredClass = 'labelrequired' ; if ( false !== $ required ) { $ label = $ requiredPrefix . $ label . $ requiredSuffix ; $ class .= ' ' . $ requiredClass ; } $ out .= static :: label ( $ name , $ label , array ( 'class' => $ class ) ) ; } return $ out ; }
Builds the label html

@param string $name The name of the html field
@param string $label The label name
@param boolean $required
@return string
Builds the label html