Render asset as HTML.

@param  string $group
@param  mixed  $source
@param  array  $attributes
@return string
189325
public function html($group, $source, $attributes)
    {
        switch ($group)
        {
            case 'script' :
                $attributes['src'] = $source;

                return '<script'.$this->attributes($attributes).'></script>'.PHP_EOL;
            case 'style' :

                $defaults = array('media' => 'all', 'type' => 'text/css', 'rel' => 'stylesheet');

                $attributes = $attributes + $defaults;

                $attributes['href'] = $source;

                return '<link'.$this->attributes($attributes).'>'.PHP_EOL;
        }
    }
467683
public function dl(array $list, array $attributes = [])
    {
        $attributes = $this->attributes($attributes);

        $html = "<dl{$attributes}>";

        foreach ($list as $key => $value) {
            $value = (array) $value;

            $html .= "<dt>$key</dt>";

            foreach ($value as $v_key => $v_value) {
                $html .= "<dd>$v_value</dd>";
            }
        }

        $html .= '</dl>';

        return $this->toHtmlString($html);
    }
1041316
public function render(Model $model, $source)
    {
        if (null === $this->resolveModelSource($model, $source)) {
            return '';
        }

        return parent::render($model, $source);
    }
551249
public function table(array $attributes = [], $drawFooter = false, $drawSearch = false)
    {
        $this->tableAttributes = array_merge($this->getTableAttributes(), $attributes);
        $htmlAttr = $this->html->attributes($this->tableAttributes);
        $tableHtml = '<table '.$htmlAttr.'></table>';

        return new HtmlString($tableHtml);
    }
1289858
public function getHtml(array $attributes = []): string
    {
        if ($this->minimumValue !== null) {
            $attributes['min'] = $this->minimumValue;
        }

        if ($this->maximumValue !== null) {
            $attributes['max'] = $this->maximumValue;
        }

        return parent::getHtml($attributes);
    }
1172089
private function getHTMLAttributes($attributes)
    {
        $attr = '';
        foreach($attributes as $key => $value) {
            $attr .= $key.'="'.$value.'" ';
        }
        return $attr;
    }
238774
protected function renderAttributes(array $attributes)
    {
        foreach ($attributes as $name => $value) {
            if (is_array($value)) {
                $value = implode(' ', (array) $value);
            }
            $attributes[$name] = $name . '="' . htmlspecialchars($value, ENT_QUOTES, 'UTF-8') . '"';
        }

        return implode(' ', $attributes);
    }
1144739
public function renderGroup($assets) {
		$out = array();
		if ($this->f3->get('ASSETS.trim_public_root')) {
			$basePath=$this->f3->fixslashes(realpath($this->f3->fixslashes(
				$_SERVER['DOCUMENT_ROOT'].$this->f3->get('BASE'))));
			$cDir=$this->f3->fixslashes(getcwd());
			$trimPublicDir=str_replace($cDir,'',$basePath);
		}
		foreach($assets as $asset_type=>$collection) {
			if ($this->f3->exists('ASSETS.filter.'.$asset_type,$filters)) {
				if (is_string($filters))
					$filters = $this->f3->split($filters);
				$flist=array_flip($filters);
				$filters = array_values(array_intersect_key(array_replace($flist, $this->filter), $flist));
				$collection = $this->f3->relay($filters,array($collection));
			}
			foreach($collection as $asset) {
				if (isset($asset['path'])) {
					$path = $asset['path'];
					$mtime = ($this->f3->get('ASSETS.timestamps') && $asset['origin']!='external'
						&& is_file($path)) ? '?'.filemtime($path) : '';
					$base = ($this->f3->get('ASSETS.prepend_base') && $asset['origin']!='external'
						&& is_file($path)) ? $this->f3->get('BASE').'/': '';
					if (isset($trimPublicDir) && $asset['origin']!='external')
						$path = substr($path,strlen($trimPublicDir));
					$asset['path'] = $base.$path.$mtime;
				}
				$out[]=$this->f3->call($this->formatter[$asset_type],array($asset));
			}
		}
		return "\n\t".implode("\n\t",$out)."\n";
	}
737136
public static function RenderAttrs (array $attributes = []) {
		$result = [];
		foreach ($attributes as $attrName => $attrValue) {
			//if (gettype($attrValue) == 'array') $stop();
			$result[] = $attrName.'="'.$attrValue.'"';
		}
		return implode(' ', $result);
	}
446288
public function imageTag($source, $alt = null, $attributes = [])
    {
        $assetsOptions = ['host' => array_pull($attributes, 'host', $this->assetsHost)];

        // E.g. image_tag('logo.png', "My Logo"); => <img src="http://localhost/assets/logo-f2331bb588d007ba354e5fa406f9f4aa.png" alt="My Logo">
        $alt = $alt ?: humanize(basename($source, ".".File::extension($source)));

        return app('html')->image($this->assetPath($source, $assetsOptions), $alt, $attributes);
    }
237977
public function newAsset($asset, $group = null, $content = '')
    {
        return $this->registry->newAsset($asset, $group, $content)
                              ->setRenderer($this->renderer);
    }
1340844
private function renderImageAsHtml($src, $alt, $attributes = '')
    {
        /** @var GenerateHtmlEvent $imageEvent */
        $imageEvent = $this->eventDispatcher->dispatch(
            ContaoEvents::IMAGE_GET_HTML,
            new GenerateHtmlEvent($src, $alt, $attributes)
        );

        return $imageEvent->getHtml();
    }
675601
private function exportDotRenderGroups($groups, $group_content, $indent = "\t") {
		foreach ($groups as $g => $group) {
			echo $indent, "subgraph ", $this->exportDotIdentifier($g, 'cluster_'), " {\n";
			if (isset($group['label'])) {
				echo $indent, "\t", "label = \"", addcslashes($group['label'], '"'), "\";\n";
			}
			if (!empty($group['color'])) {
				echo $indent, "\t", "color=\"", addcslashes($group['color'], '"'), "\";\n";
				echo $indent, "\t", "fontcolor=\"", addcslashes($group['color'], '"'), "\";\n";
			} else {
				// This cannot be defined globally, since nested groups inherit the settings.
				echo $indent, "\t", "color=\"#666666\";\n";
				echo $indent, "\t", "fontcolor=\"#666666\";\n";
			}
			foreach ($group_content[$g] as $s) {
				echo $indent, "\t", $this->exportDotIdentifier($s), ";\n";
			}
			if (isset($group['groups'])) {
				$this->exportDotRenderGroups($group['groups'], $group_content, "\t".$indent);
			}
			echo $indent, "}\n";
		}
	}
1001444
public function addImage($source = null, $attributes = [])
    {
        $validKeys = [
            'url',
            'secure_url',
            'type',
            'width',
            'height',
        ];

        if (is_array($source)) {
            $this->images[] = $this->cleanProperties($source, $validKeys);
        } else {
            $this->images[] = [
                $source,
                $this->cleanProperties($attributes, $validKeys),
            ];
        }

        return $this;
    }
454562
public function getHtml(array $attributes = []): string
    {
        return self::buildTag('input', null,
            array_merge(
                [
                    'type'     => $this->getType(),
                    'name'     => $this->getName(),
                    'value'    => $this->getText() !== '' ? $this->getText() : false,
                    'required' => $this->isRequired(),
                ],
                $attributes
            )
        );
    }
1139912
public function javascriptIncludeTag($sources = "application", $attributes = [])
    {
        // E.g. javascript_include_tag('app'); => app-9fcd9b50e5cb047af35d3c5a4b55f73f.js
        $args = func_get_args();
        if (is_array(last($args))) {
            $attributes = array_pop($args);
        } else {
            $attributes = [];
        }
        $sources = is_array($sources) ? $sources : $args;
        if (empty($sources)) {
            $sources = ["application"];
        }

        $assetsOptions = ['host' => array_pull($attributes, 'host', $this->assetsHost)];

        $defaults = ['type' => 'text/javascript'];
        $attributes = $attributes + $defaults;

        $javascript_tags = [];
        foreach ((array) $sources as $source) {
            $sourceName = "$source.js";
            $javascript_tags[] = app('html')->script($this->assetPath($sourceName, $assetsOptions), $attributes);
        }

        return implode($javascript_tags);
    }
305715
public function getHtml(array $attributes = []): string
    {
        return self::buildTag('input', null,
            array_merge(
                [
                    'type'     => 'file',
                    'name'     => $this->getName(),
                    'required' => $this->isRequired(),
                ],
                $attributes
            )
        );
    }