Creates the label code.

@return HTMLBrick
976713
public function label()
    {
        if (!$this->label) {
            return;
        }

        $label = new HTMLBrick('label', $this->label);
        $label->addClass('col-lg-2');
        $label->addClass('control-label');

        return $label;
    }
567226
protected function buildHeader()
    {
        $close = '<button type="button" class="close" data-dismiss="modal" '
            . 'aria-label="Close"><span aria-hidden="true">&times;</span></button>';


        $tag = $this->titleTag;
        $tid = $this->attr['id'] . '-label';
        $ttl = $this->title;

        $title = "<${tag} class=\"modal-title\" id=\"$tid\">{$ttl}</{$tag}>";

        $this->html .= $this->indent(3, '<div class="modal-header">');
        $this->html .= $this->indent(4, $close);
        $this->html .= $this->indent(4, $title);
        $this->html .= $this->indent(3, '</div>');
    }
58335
protected function getLabel()
	{
		// Initialise variables.
		$label = '';

		if ($this->hidden)
		{
			return $label;
		}

		// Get the label text from the XML element, defaulting to the element name.
		$text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];
		$text = $this->translateLabel ? Lang::txt($text) : $text;

		// Build the class for the label.
		$class = !empty($this->description) ? 'hasTip' : '';
		$class = $this->required == true ? $class . ' required-field' : $class;
		$class = !empty($this->labelClass) ? $class . ' ' . $this->labelClass : $class;

		// Add the opening label tag and main attributes attributes.
		$label .= '<label id="' . $this->id . '-lbl" for="' . $this->id . '" class="' . $class . '"';

		// If a description is specified, use it to build a tooltip.
		if (!empty($this->description))
		{
			$label .= ' title="'
				. htmlspecialchars(
				trim($text, ':') . '::' . ($this->translateDescription ? Lang::txt($this->description) : $this->description),
				ENT_COMPAT, 'UTF-8'
			) . '"';
		}

		// Add the label text and closing tag.
		if ($this->required)
		{
			$label .= '>' . $text . ' <span class="required star">' . Lang::txt('JOPTION_REQUIRED'). '</span></label>';
		}
		else
		{
			$label .= '>' . $text . '</label>';
		}

		return $label;
	}
447291
public function getFlaggedNice()
    {
        $obj = HTMLText::create();
        $obj->setValue(($this->Flag)? '<span class="red">&#10033;</span>' : '');
        
        $this->extend("updateFlaggedNice", $obj);
        
        return $obj;
    }
91007
public function createLabels()
    {
        // default labels
        $labels = [
            'name' => $this->plural,
            'singular_name' => $this->singular,
            'menu_name' => $this->plural,
            'all_items' => $this->plural,
            'add_new' => "Add New",
            'add_new_item' => "Add New {$this->singular}",
            'edit_item' => "Edit {$this->singular}",
            'new_item' => "New {$this->singular}",
            'view_item' => "View {$this->singular}",
            'search_items' => "Search {$this->plural}",
            'not_found' => "No {$this->plural} found",
            'not_found_in_trash' => "No {$this->plural} found in Trash",
            'parent_item_colon' => "Parent {$this->singular}:",
        ];

        return array_replace_recursive($labels, $this->labels);
    }
1075683
public function code()
    {
        $fieldWrapper = new HTMLBrick('div', $this->field());
        $fieldWrapper->addClass('col-lg-9');

        $formGroup = new HTMLBrick('div', $this->label().$fieldWrapper);
        $formGroup->addClass('form-group');
        if ($this->hasError) {
            $formGroup->addClass('has-error');
        }

        return $formGroup;
    }
609157
protected JLabel createMessageLabel() {
        JLabel messageLabel = new JLabel(" ");
        messageLabel.setName("message");
        Border bevelBorder = BorderFactory.createBevelBorder(BevelBorder.LOWERED, UIManager
                .getColor("controlHighlight"), UIManager.getColor("controlShadow"));
        Border emptyBorder = BorderFactory.createEmptyBorder(1, 3, 1, 3);
        messageLabel.setBorder(BorderFactory.createCompoundBorder(bevelBorder, emptyBorder));

        return messageLabel;
    }
636977
public function buildHtml()
	{
		$list	= array();
		$divs	= array();
		foreach( $this->steps as $nr => $step )
		{
			$id		= $this->id."_link".$nr;
			$list[]	= UI_HTML_Elements::ListItem( $step['label'], 0, array( 'id' => $id ) );
			$id		= $this->id."_".$nr;
			$divs[] = UI_HTML_Tag::create( 'div', $step['content'], array( 'id' => $id ) );
		}
		$list	= UI_HTML_Elements::unorderedList( $list );
		$divs	= implode( "\n", $divs );
		$div	= UI_HTML_Tag::create( 'div', "\n".$list.$divs."\n", array( 'id' => $this->id ) );
		return $div;
	}
1360640
public function field()
    {
        $input = new HTMLBrick('textarea', $this->value, [
            'id'   => $this->id,
            'name' => $this->name,
            'rows' => $this->rows,
        ]);
        $input->addClass('form-control');
        $input->addClass('rich');

        return $input;
    }
294486
public function createPreviewTextElement() {
        $options['label']    = $this->translate->_('Preview Text');
        $options['nohidden'] = true;

        return $this->_form->createElement('Html', 'preview_text', $options);
    }
39212
public function renderLabel()
	{
		$options = array(
			'label'=>$this->getLabel(),
			'required'=>$this->getRequired()
		);

		if(!empty($this->attributes['id']))
			$options['for']=$this->attributes['id'];

		return CHtml::activeLabel($this->getParent()->getModel(), $this->name, $options);
	}
1000120
private function build() {

    	if(null === $this -> text) {

    		$html = '<input type="'. $this -> type .'"';
    		
    		foreach($this -> attributes as $attribute => $value) {
    		    $html .= ' ' . $attribute . '="'. Escape :: attr($value) .'"';
    		}

    		$html .= '>';

    		return $html;
    	}

        $this -> fill();
        
        $html = '<button';
        
        foreach($this -> attributes as $attribute => $value) {
            $html .= ' ' . $attribute . '="'. Escape :: attr($value) .'"';
        }

        $html .= '>' . Escape :: html($this -> text) . '</button>';

        return $html;
        
    }
1316334
public function createLabel($textContent = null, array $attributes = [])
    {
        $label = new Form\Elements\Label($attributes);
        $label->attributes->addAttributeClass('col-form-label');

        if (isset($textContent)) {
            $label->textContent->push($textContent);
        }

        $this->childNodes->push($label);

        return $this->childNodes->last();
    }
206279
public function createNode(): Node
    {
        //Content of node to be imported
        $node = $this->compiler->createNode($this->path, $this->token);

        //Let's register user defined blocks (context and attributes) as placeholders
        $node->mountBlock(
            self::CONTEXT_BLOCK,
            [],
            [$this->createPlaceholder(self::CONTEXT_BLOCK, $contextID)],
            true
        );

        foreach ($this->token[HtmlTokenizer::TOKEN_ATTRIBUTES] as $attribute => $value) {
            //Attributes counted as blocks to replace elements in included node
            $node->mountBlock($attribute, [], [$value], true);
        }

        //We now have to compile node content to pass it's body to parent node
        $content = $node->compile($dynamic);

        //Outer blocks (usually user attributes) can be exported to template using non default
        //rendering technique, for example every "extra" attribute can be passed to specific
        //template location. Stempler to decide.
        foreach ($this->compiler->getExports() as $exporter) {
            /** @var array $dynamic */
            $content = $exporter->mountBlocks($content, $dynamic);
        }

        //Let's parse complied content without any imports (to prevent collision)
        $compiler = clone $this->compiler;

        //Outer content must be protected using unique names
        $rebuilt = new Node($compiler, $compiler->generateID(), $content);

        if (!empty($contextBlock = $rebuilt->findNode($contextID))) {
            //Now we can mount our content block
            $contextBlock->mountNode($this->contextNode());
        }

        return $rebuilt;
    }
470013
public function getIsActiveLabelAttribute()
    {
        $title = 'Not Active';
        $class = 'danger';

        $from = Carbon::parse($this->active_from);
        $to = Carbon::parse($this->active_to);

        if (!$this->active_to || Carbon::now()->diffInMinutes($to, false) > 0) {
            if (Carbon::now()->diffInMinutes($from, false) < 0) {
                $title = 'Active';
                $class = 'success';
            }
        }

        return "<span class='label label-{$class}'>{$title}</span>";
    }
1052064
protected function renderButton()
    {
        Html::addCssClass($this->options, 'btn');
        $label = $this->label;
        if ($this->encodeLabel) {
            $label = Html::encode($label);
        }
        if (!isset($this->iconOptions['class'])) {
            $this->iconOptions['class'] = 'caret';
        }
        if ($this->split) {
            $options = $this->options;
            $this->options['data-toggle'] = 'dropdown';
            Html::addCssClass($this->options, 'dropdown-toggle');
            $splitButton = Button::widget([
                'label' => Html::tag('span', '', $this->iconOptions),
                'encodeLabel' => false,
                'options' => $this->options,
                'view' => $this->getView(),
            ]);
        } else {
            $label .= ' ' . Html::tag('span', '', $this->iconOptions);
            $options = $this->options;
            if (!isset($options['href'])) {
                $options['href'] = '#';
            }
            Html::addCssClass($options, 'dropdown-toggle');
            $options['data-toggle'] = 'dropdown';
            $splitButton = '';
        }

        return Button::widget([
            'tagName' => $this->tagName,
            'label' => $label,
            'options' => $options,
            'encodeLabel' => false,
            'view' => $this->getView(),
        ]) . "\n" . $splitButton;
    }
912443
public function label() {
		$output = null;
		if ( ! empty( $this->struct['label'] ) ) {
			$output .= '<span class="uix-text">' . esc_html( $this->struct['label'] ) . '</span>';
		}

		return $output;
	}