Jumbotron::createHeader

@param string $text
@param string $tagName
@param array  $attributes

@return Element
187795
public function createHeader($text, $tagName = 'h1', array $attributes = ['class' => 'display-3'])
    {
        $header = new Element($tagName, 'header-' . dash($text));
        $header->textContent->push($text);

        if (count($attributes)) {
            foreach ($attributes as $name => $value) {
                $header->attributes->addAttribute($name, $value);
            }
        }

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

        return $this->childNodes->last();
    }
1149290
public function createColumns(array $columns, $tagName = 'td')
    {
        foreach ($columns as $column) {
            if ($column instanceof Column) {
                $column->tagName = $tagName;
                $this->childNodes->push($column);
            } else {
                $columnElement = $this->createColumn($tagName);
                if ($column instanceof Element) {
                    $columnElement->entity->setEntityName($column->entity->getEntityName());
                    $columnElement->childNodes->push($column);
                } else {
                    $columnElement->entity->setEntityName('col-' . $column);
                    $columnElement->textContent->push($column);
                }
            }
        }

        return $this;
    }
1146713
public function asHtml($text)
    {
        $stream = StreamFactory::string($text);
        return new Response($stream, self::OK, ['Content-Type' => 'text/html']);
    }
279542
public function link($url, $title, $attributes = [])
    {
        $attributes['href'] = $url;
        $tag = new Tag('a', $attributes);
        $tag->setText($title);
        return $tag;
    }
553139
public static function submit($text, $attributes = array())
    {
        if (isset($attributes['name'])) {
            $name = $attributes['name'];
            unset($attributes['name']);
        } else {
            $name = 'submit';
        }

        return self::input('submit', $name, array_merge(array('value' => $text), $attributes));
    }
847860
private function createHeader($children = array(), $text = null)
    {
        return $this->createElement('th', $children, array('class' => $this->options['tableHeaderClass']), $text);
    }
1314793
public static function add(string $text, string $tag): string
    {
        return self::wrap($text, $tag);
    }
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();
    }
960632
public function header($tag = 'h1', $attr = null)
  {
    return new Tag($tag, $this->getHeader() ?: $this->getTitle(), $attr);
  }
429889
public static function text($name, $value, array $attributes = array())
    {
        $node = new Node\Text();

        if (!is_null($name)) {
            $attributes['name'] = $name;
        }

        if (!is_null($value)) {
            $attributes['value'] = $value;
        }

        return $node->render($attributes);
    }
1232551
protected function createTag($tagName, $template)
	{
		$tag = new Tag;
		foreach ($this->captures as $key => $capture)
		{
			if (!isset($capture['name']))
			{
				continue;
			}

			$attrName = $capture['name'];
			if (isset($tag->attributes[$attrName]))
			{
				continue;
			}

			$this->addAttribute($tag, $attrName);
		}
		$tag->template = $template;

		// Normalize the tag's template
		$this->configurator->templateNormalizer->normalizeTag($tag);

		// Check the safeness of this tag
		$this->configurator->templateChecker->checkTag($tag);

		return $this->configurator->tags->add($tagName, $tag);
	}
375568
public function create(string $content, $url, array $attributes = []) : string
    {
        return $this->make(new HrefSettings([
            'content'   => $content,
            'url'       => $url,
            'attributes'=> $attributes,
        ]));
    }
385993
public function writeElement(
            string $elementName,
            array $attributes = [],
            string $cdata     = null
    ): XmlStreamWriter {
        $this->writeStartElement($elementName);
        foreach ($attributes as $attName => $attValue) {
            $this->writeAttribute($attName, $attValue);
        }

        if (null !== $cdata) {
            $this->writeText($cdata);
        }

        $this->writeEndElement();
        return $this;
    }
893704
public static function create( $name, $content = NULL, $attributes = array(), $data = array() )
	{
		if( !strlen( $name	= trim( $name ) ) )
			throw new InvalidArgumentException( 'Missing tag name' );
		$name		= strtolower( $name );
		try{
			$attributes	= self::renderAttributes( $attributes );
			$data		= self::renderData( $data );
		}
		catch( InvalidArgumentException $e ) {
			if( version_compare( PHP_VERSION, '5.3.0', '>=' ) )
				throw new RuntimeException( 'Invalid attributes', NULL, $e );						//  throw exception and transport inner exception
			throw new RuntimeException( 'Invalid attributes', NULL );								//  throw exception
		}
		if( $content === NULL || $content === FALSE )												//  no node content defined, not even an empty string
			if( !in_array( $name, self::$shortTagExcludes ) )										//  node name is allowed to be a short tag
				return "<".$name.$attributes.$data."/>";											//  build and return short tag
		if( is_array( $content ) )																	//  content is an array, may be nested
			$content	= self::flattenArray( $content, '' );
		if( is_numeric( $content ) )
			$content	= (string) $content;
		if( is_object( $content ) ){
			if( !method_exists( $content, '__toString' ) ){											//  content is not a renderable object
				$message	= 'Object of class "'.get_class( $content ).'" cannot be rendered';		//  prepare message about not renderable object
				throw new InvalidArgumentException( $message ); 									//  break with error message
			}
			$content	= (string) $content;														//  render object to string
		}
		if( !is_null( $content ) && !is_string( $content ) ){										//  content is neither NULL nor string so far
			$message	= 'Content type "'.gettype( $content ).'" is not supported';				//  prepare message about wrong content data type
			throw new InvalidArgumentException( $message ); 										//  break with error message
		}
		return "<".$name.$attributes.$data.">".$content."</".$name.">";								//  build and return full tag
	}
789142
public function tag($tag, $content, array $attributes = [])
    {
        return $this->htmlBuilder->tag($tag, $content, $attributes);
    }
531049
public function create($tag = 'div', $value = null, $attributes = [])
    {
        if (is_array($value)) {
            $attributes = $value;
            $value      = null;
        }

        $content = '<'.$tag.$this->attributes($attributes).'>';

        if (! is_null($value)) {
            $content .= $this->entities($value).'</'.$tag.'>';
        }

        return $this->raw($content);
    }
729142
function appendToHead(document, tagName, attrs) {
	var elt = document.createElement(tagName);
	DOMDataUtils.addAttributes(elt, attrs || Object.create(null));
	document.head.appendChild(elt);
}