Create label tag.

@param string $id
@param string $valAlias
@param string $content
@return string
963445
public function label($id, $valAlias, $content = '')
    {
        $class = implode(' ', array(
            $this->_jbSrt($this->_type . '-lbl'),
            $this->_jbSrt('label-' . $valAlias),
        ));

        return '<label for="' . $id . '" class="' . $class . '">' . $content . '</label>';
    }
397861
public function PluginController_TagSearch_Create($Sender, $q, $id = false) {
      
      // Allow per-category tags
      $CategorySearch = C('Plugins.Tagging.CategorySearch', FALSE);
      if ($CategorySearch)
         $CategoryID = GetIncomingValue('CategoryID');
      
      $Query = $q;
      $Data = array();
      $Database = Gdn::Database();
      if ($Query) {
         $Test = Gdn::SQL()->Limit(1)->Get('Tag')->FirstRow(DATASET_TYPE_ARRAY);
         if (isset($Test['Type'])) {
            Gdn::SQL()->Where("nullif(Type, '') is null"); // Other UIs can set a different type
         }
         
         $TagQuery = Gdn::SQL()
            ->Select('TagID, Name')
            ->From('Tag')
            ->Like('Name', str_replace(array('%', '_'), array('\%', '_'), $Query), strlen($Query) > 2 ? 'both' : 'right')
            ->Limit(20);
         
         // Allow per-category tags
         if ($CategorySearch)
            $TagQuery->Where('CategoryID', $CategoryID);
         
         // Run tag search query
         $TagData = $TagQuery->Get();
         
         foreach ($TagData as $Tag) {
            $Data[] = array('id' => $id ? $Tag->TagID : $Tag->Name, 'name' => $Tag->Name);
         }
      }
      // Close the db before exiting.
      $Database->CloseConnection();
      // Return the data
      header("Content-type: application/json");
      echo json_encode($Data);
      exit();
   }
766901
public function htmlLabel($identifier, $content="", $icon=NULL,$tagName="div") {
		return $this->addHtmlComponent(new HtmlLabel($identifier, $content,$icon, $tagName));
	}
1312409
protected function _renderTag($attribs = array(), $content = null)
    {
        if($this->getTemplate()->decorator() == 'joomla')
        {
            $link      = isset($attribs['src']) ? $attribs['src'] : false;
            $condition = isset($attribs['condition']) ? $attribs['condition'] : false;

            if(!$link)
            {
                $script = trim($content);
                $hash   = md5($script.serialize($attribs));

                if (!isset($this->_loaded[$hash]))
                {
                    JFactory::getDocument()->addScriptDeclaration($script);
                    $this->_loaded[$hash] = true;
                }
            }
            else
            {
                if($condition)
                {
                    $script = parent::_renderTag($attribs, $content);
                    JFactory::getDocument()->addCustomTag($script);
                }
                else
                {
                    unset($attribs['src']);
                    unset($attribs['condition']);

                    JFactory::getDocument()->addScript($link, 'text/javascript');
                }
            }
        }
        else return parent::_renderTag($attribs, $content);
    }
429096
public static function panel($text, $id)
	{
		$content = '';
		if (self::$open)
		{
			$content .= '</div></div>';
		}
		else
		{
			self::$open = true;
		}
		$content .= '<h3 class="pane-toggler title" id="' . $id . '"><a href="#' . $id . '"><span>' . $text . '</span></a></h3><div class="panel"><div class="pane-slider content">';

		return $content;
	}
512628
public function tag($name, $content, $htmlOptions = array()) {
        $element = "<$name ";
        foreach ($htmlOptions as $k => $v) {
            $element .= "$k=\"" . self::encode($v) . "\" ";
        }
        return $element . '>' . $content . '</' . $name . '>';
    }
1349333
public function getEntityTag(string $id, EntityDefinition $definition): string
    {
        $keys = [$definition->getEntityName(), $id];

        return implode('-', $keys);
    }
321500
public function tagUrl($tag, $content)
    {
        $url    = isset($tag['link']) ? $tag['link'] : '';
        $vars   = isset($tag['vars']) ? $tag['vars'] : '';
        $suffix = isset($tag['suffix']) ? $tag['suffix'] : 'true';
        $domain = isset($tag['domain']) ? $tag['domain'] : 'false';

        return '<?php echo url("' . $url . '","' . $vars . '",' . $suffix . ',' . $domain . ');?>';
    }
855888
public function label($text)
    {
        $label = self::createElement('label');

        if (isset($this->attributeList['id'])) {
            $label->refer($this->attributeList['id']);
        }

        return $label->text($this)
            ->text($text);
    }
789142
public function tag($tag, $content, array $attributes = [])
    {
        return $this->htmlBuilder->tag($tag, $content, $attributes);
    }
77863
protected function saveLabel( $id, $label )
    {
        $locale = $this->getLocale();
        $sql    = $this->sql( $this->getTableInSchema(
            static::$labelTableName
        ) );

        $update = $sql->update()
                      ->set( array(
                          'label'   => $label,
                      ) )
                      ->where( array(
                          'menuId'  => $id,
                          'locale'  => $locale,
                      ) );

        $affected = $sql->prepareStatementForSqlObject( $update )
                        ->execute()
                        ->getAffectedRows();

        if ( $affected < 1 )
        {
            $insert = $sql->insert()
                          ->values( array(
                              'menuId'  => $id,
                              'locale'  => $locale,
                              'label'   => $label,
                          ) );

            $affected = $sql->prepareStatementForSqlObject( $insert )
                            ->execute()
                            ->getAffectedRows();
        }

        return $affected;
    }
1286533
private String[] createLabels(final String id, final Object[] keys)
    {
        String[] messages = new String[keys.length];
        for (int i = 0; i < messages.length; ++i)
        {
            messages[i] = getApplicationConfig().messageResolver().getMessage(id, keys[i] == null ? "null" : keys[i].toString(),
                    "label");
        }
        return messages;
    }
163156
public static function createTag($tag, $htmlOptions = null, $content = null)
    {
        $return = '';
        $tag = self::clearAttributeKey(trim($tag));
        if ($tag) {
            $attributes = self::createAttributeString($htmlOptions);
            $return = '<' . $tag . (!empty($attributes) ? ' ' . $attributes : '');
            if ($content === false) {
                $return .= '>';
            } elseif ($content === true) {
                $return .= '>';
            } else {
                $return .= '>' . $content . self::createCloseTag($tag);
            }
        }

        return $return;
    }
1198366
public static function ol(
        string $content = null, 
        array $attributes = []
    ) : string
    {
        return self::tag("ol", $content, $attributes);
    }
1142822
protected function toXmlTag($tag, $attrs, $content = null)
    {
        $xml = "<$tag ";
        if ($attrs) {
            $attrStrs = array();
            foreach ($attrs as $attrName => $attrVal) {
                $attrStrs[] = "$attrName='$attrVal'";
            }
            $xml .= $attrStrs ? implode(' ', $attrStrs) : '';
        }
        $xml .= $content ? ">$content</$tag>" : '/>';
        return $xml;
    }
148834
public static function create($tagName, $content = '') {
		if (isset(self::$tagClassMap[$tagName])) {
			$class = self::$tagClassMap[$tagName];
			return new $class($content);
		} else {
			return new UnknownTag($tagName, $content);
		}
	}
215019
public static function label($label, $id = null, array $attributes = array())
	{
		return static::$instance->label($label, $id, $attributes);
	}