Render the tag

@param   array   $attribs Associative array of attributes
@param   string  $content The tag content
@return string
12468
protected function _renderTag($attribs = array(), $content = null)
    {
        if($this->getTemplate()->decorator() == 'joomla')
        {
            $meta = parent::_renderTag($attribs, $content);
            JFactory::getDocument()->addCustomTag($meta);
        }
        else return parent::_renderTag($attribs, $content);
    }
213776
public function render($name = '', $content = '', array $attrs = array(), $type = 'submit')
    {
        $attrs = array_merge(array('text' => null, 'name' => $name), $attrs);

        $attrs = $this->_getBtnClasses($attrs);
        $attrs['type'] = $type;

        if (Arr::key('icon', $attrs)) {
            $content = '<i class="' . $this->_icon . '-' . $attrs['icon'] . '"></i> ' . $this->_translate($content);
            unset($attrs['icon']);
        }

        return '<button ' . $this->buildAttrs($attrs) . '>' . $content . '</button>';
    }
602774
public static function table(
        string $content = null, 
        array $attributes = []
    ) : string
    {
        return self::tag("table", $content, $attributes);
    }
1175432
protected function _renderHtmlAttribs(Garp_Util_Configuration $attribs) {
        $attributePairs = array();
        foreach ($attribs as $attribName => $attribValue) {
            $attributesPairs[] = $attribName . '="' . $attribValue . '"';
        }
        return implode(' ', $attributesPairs);
    }
849742
public function html($content) {
        if (func_num_args() == 1) {
            $this->_data['fields'][] = $content;
            return $this;
        }
        $this->__attributes['fields'][$content] = func_get_arg(1);
        return $this;
    }
1233502
protected function _renderTag($attribs = array(), $content = null, TemplateInterface $template)
    {
        $attribs = $this->buildAttributes($attribs);

        $html = '<meta '.$attribs.' />'."\n";
        return $html;
    }
1372876
static public function linkify($text, array $attribs = array()) {
        return self::linkUrls(self::linkEmailAddresses($text, $attribs), $attribs);
    }
522244
public function render(array $tag, $content) {
        $setup = $this->getFilter()->getTag($tag['tag']);
        $attributes = $tag['attributes'];

        // Dashes aren't allowed in variables, so change to underscores
        foreach ($attributes as $key => $value) {
            $attributes[str_replace('-', '_', $key)] = $value;
        }

        foreach ($this->getPaths() as $path) {
            $template = sprintf('%s%s.php', $path, $setup['template']);

            if (file_exists($template)) {
                extract($attributes, EXTR_OVERWRITE);
                ob_start();

                include $template;

                return trim(ob_get_clean());
            }
        }

        throw new IoException(sprintf('Template file %s does not exist', $setup['template']));
    }
575937
public static function span(
        string $content = null, 
        array $attributes = []
    ) : string 
    {
        return self::tag("span", $content, $attributes);
    }
804816
protected function _renderStyle($style, $link, $attribs = array())
    {
        //get the correct URL
        if ($link) {
            $style = pick($this->getService('com:base.template.asset')->getURL($style), $style);
        }

        //if ajax try to get the content of the file
        if (AnRequest::type() == 'AJAX') {
            if ($link) {
                $file = $this->getService('com:base.template.asset')->getFilePath($style);
                if ($file) {
                    $style = file_get_contents($file);
                    $link = false;
                }
            }

            return parent::_renderStyle($style, $link, $attribs);
        }

        $document = AnService::get('anahita:document');

        if($link) {
            return $document->addStyleSheet($style, 'text/css', null, $attribs);
        } else {
            return $document->addStyleDeclaration($style);
        }
    }
118953
public function show($value = '', $attrib = null)
    {
        // overwrite object attributes
        if (is_array($attrib)) {
            $this->attrib = array_merge($this->attrib, $attrib);
        }

        // set value attribute
        $this->attrib['checked'] = ((string)$value == (string)$this->attrib['value']);

        return parent::show();
    }
1201152
public static function attrib_string($attrib = array(), $allowed = null)
    {
        if (empty($attrib)) {
            return '';
        }

        $allowed_f  = array_flip((array)$allowed);
        $attrib_arr = array();

        foreach ($attrib as $key => $value) {
            // skip size if not numeric
            if ($key == 'size' && !is_numeric($value)) {
                continue;
            }

            // ignore "internal" or empty attributes
            if ($key == 'nl' || $value === null) {
                continue;
            }

            // ignore not allowed attributes, except aria-* and data-*
            if (!empty($allowed)) {
                $is_data_attr = @substr_compare($key, 'data-', 0, 5) === 0;
                $is_aria_attr = @substr_compare($key, 'aria-', 0, 5) === 0;
                if (!$is_aria_attr && !$is_data_attr && !isset($allowed_f[$key])) {
                    continue;
                }
            }

            // skip empty eventhandlers
            if (preg_match('/^on[a-z]+/', $key) && !$value) {
                continue;
            }

            // attributes with no value
            if (in_array($key, self::$bool_attrib)) {
                if ($value) {
                    $value = $key;
                    if (self::$doctype == 'xhtml') {
                        $value .= '="' . $value . '"';
                    }

                    $attrib_arr[] = $value;
                }
            }
            else {
                $attrib_arr[] = $key . '="' . self::quote($value) . '"';
            }
        }

        return count($attrib_arr) ? ' '.implode(' ', $attrib_arr) : '';
    }
902295
public static function thead(
        string $content = null, 
        array $attributes = []
    ) : string
    {
        return self::tag("thead", $content, $attributes);
    }
454071
public function render($module, $attribs = array())
	{
		static $chrome;

		if (null !== $this->profiler)
		{
			$this->profiler->mark('beforeRenderModule ' . $module->module . ' (' . $module->title . ')');
		}

		// Record the scope.
		$scope = $this->app->has('scope') ? $this->app->get('scope') : null;

		// Set scope to component name
		$this->app->set('scope', $module->module);

		// Get module parameters
		$params = new Registry($module->params);

		if (isset($attribs['params']))
		{
			$customparams = new Registry(html_entity_decode($attribs['params'], ENT_COMPAT, 'UTF-8'));

			$params->merge($customparams);

			$module->params = $params->toString();
		}

		// Get module path
		$module->module = $this->canonical($module->module);

		$path = $this->path($module->module);

		// Load the module
		// $module->user is a check for 1.0 custom modules and is deprecated refactoring
		if (file_exists($path))
		{
			$this->app['language']->load($module->module, PATH_APP . DS . 'bootstrap' . DS . $this->app['client']->name, null, false, true) ||
			$this->app['language']->load($module->module, dirname($path), null, false, true);

			$module->path = $path;

			$content = '';
			ob_start();
			include $path;
			$module->content = ob_get_contents() . $content;
			ob_end_clean();
		}

		// Load the module chrome functions
		if (!$chrome)
		{
			$chrome = array();
		}

		include_once PATH_CORE . DS . 'templates' . DS . 'system' . DS . 'html' . DS . 'modules.php';
		$chromePath = $this->app['template']->path . DS . 'html' . DS . 'modules.php';

		if (!isset($chrome[$chromePath]))
		{
			if (file_exists($chromePath))
			{
				include_once $chromePath;
			}

			$chrome[$chromePath] = true;
		}

		// Make sure a style is set
		if (!isset($attribs['style']))
		{
			$attribs['style'] = 'none';
		}

		// Dynamically add outline style
		if ($this->outline())
		{
			$attribs['style'] .= ' outline';
		}

		foreach (explode(' ', $attribs['style']) as $style)
		{
			$chromeMethod = 'modChrome_' . $style;

			// Apply chrome and render module
			if (function_exists($chromeMethod))
			{
				$module->style = $attribs['style'];

				ob_start();
				$chromeMethod($module, $params, $attribs);
				$module->content = ob_get_contents();
				ob_end_clean();
			}
		}

		// Revert the scope
		$this->app->forget('scope');
		$this->app->set('scope', $scope);

		if (null !== $this->profiler)
		{
			$this->profiler->mark('afterRenderModule ' . $module->module . ' (' . $module->title . ')');
		}

		return $module->content;
	}
916649
private function render($content, array $attributes = []): string
    {
        $template = $attributes[$this->attributeName] ?? '';

        return $this->environment->render($template, ['content' => $content]);
    }
827828
public function request_form($attrib, $content = '')
    {
        $hidden = new html_hiddenfield();
        if ($attrib['task']) {
            $hidden->add(array('name' => '_task', 'value' => $attrib['task']));
        }
        if ($attrib['action']) {
            $hidden->add(array('name' => '_action', 'value' => $attrib['action']));
        }

        // we already have a <form> tag
        if ($attrib['form']) {
            if ($this->framed || $this->env['framed']) {
                $hidden->add(array('name' => '_framed', 'value' => '1'));
            }

            return $hidden->show() . $content;
        }

        unset($attrib['task'], $attrib['request']);
        $attrib['action'] = './';

        return $this->form_tag($attrib, $hidden->show() . $content);
    }
511337
public function render($name, $content = '', $class = '', $id = '', array $attrs = array())
    {
        $attrs['name'] = $name;
        $attrs['tag']  = 'textarea';

        return Html::_('tag')->render($content, $class, $id, $attrs);
    }