Add a subtitle section to the body

@param string $content
@param string $tag title tag, defaults to h6

@return Bootstrap4Card
352434
public function addSubtitleToBody(string $content, string $tag = 'h6') : Bootstrap4Card
    {
        $this->body_sections[] = [
            'type' => 'subtitle',
            'tag' => $tag,
            'content' => $content
        ];

        return $this;
    }
1125160
protected function insertTagsIntoHead($jsRequirements, $content)
    {
        $content = preg_replace(
            '/(<\/head>)/i',
            $this->escapeReplacement($jsRequirements) . '\\1',
            $content
        );
        return $content;
    }
962405
public static function metaTag($name, $content)
    {
        if (self::$_page) {
            self::$_page->metaTag($name, $content);
        }
    }
920628
public function tagSwitch($tag, $content)
    {
        $name     = !empty($tag['expression']) ? $tag['expression'] : $tag['name'];
        $name     = $this->autoBuildVar($name);
        $parseStr = '<?php switch(' . $name . '): ?>' . $content . '<?php endswitch; ?>';

        return $parseStr;
    }
148459
public function setContent($content)
    {
        if (!is_null($content)) {
            $content = (string) $content;
        }

        $this->content = $content;
        return $this;
    }
1228420
public function text($content = '')
    {
        $this->format = 'text';

        if (! str_empty($content)) {
            $this->content($content);
        }

        return $this;
    }
582648
public static function createFromContent($content)
    {
        $domDocument = new \DOMDocument();

        @$domDocument->loadHTML($content);

        $xpathQueryBuilder = new XpathQueryBuilder();

        $xpathQueryBuilder->setDomXpath(new \DOMXPath($domDocument));

        return $xpathQueryBuilder;
    }
1180851
public function addCDATASection($content)
    {
        switch (true) {
            case is_string($content):
                break;
            case ($content instanceof \SimpleXMLElement):
                $dom = dom_import_simplexml($content);
                $content = $dom->ownerDocument->saveXML($dom->ownerDocument->documentElement);
                break;
            case ($content instanceof \DOMDocument):
                $content = $content->saveXML($content->childNodes->item(0));
                break;
            case ($content instanceof \DOMNode):
                $dom = new \DOMDocument();
                $import = $dom->importNode($content, true);
                $dom->appendChild($import);
                $content = $dom->saveXML($dom->firstChild);
                break;
            default:
                throw new \InvalidArgumentException(
                    sprintf(
                        'expected arguement 1 to be String, SimpleXMLElement, DOMNode, or DOMDocument, instead saw %s',
                        gettype($content)
                    )
                );
        }

        $import = dom_import_simplexml($this);
        $node   = $import->ownerDocument;
        $import->appendChild($node->createCDATASection($content));
    }
655531
public function createHeader($text, $tagName = 'h6')
    {
        $header = new Element($tagName);
        $header->attributes->addAttributeClass('dropdown-header');
        $header->textContent->push($text);

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

        return $this->childNodes->last();
    }
136268
public function tagCase($tag, $content)
    {
        $value = isset($tag['expression']) ? $tag['expression'] : $tag['value'];
        $flag  = substr($value, 0, 1);

        if ('$' == $flag || ':' == $flag) {
            $value = $this->autoBuildVar($value);
            $value = 'case ' . $value . ':';
        } elseif (strpos($value, '|')) {
            $values = explode('|', $value);
            $value  = '';
            foreach ($values as $val) {
                $value .= 'case "' . addslashes($val) . '":';
            }
        } else {
            $value = 'case "' . $value . '":';
        }

        $parseStr = '<?php ' . $value . ' ?>' . $content;
        $isBreak  = isset($tag['break']) ? $tag['break'] : '';

        if ('' == $isBreak || $isBreak) {
            $parseStr .= '<?php break; ?>';
        }

        return $parseStr;
    }
1129360
protected function _replaceSection( $content, $section, $marker )
	{
		$marker = '<!-- ' . $marker . ' -->';
		$start = strpos( $content, $marker );

		if( $start !== false && ( $end = $end = strpos( $content, $marker, $start+1 ) ) !== false ) {
			return substr_replace( $content, $section, $start, $end - $start + strlen( $marker) );
		}

		return $content;
	}
27908
public function append(Tag $tag) : Tag
    {
        if ($this->isVoid) {
            throw new \LogicException('Void elements cannot have any contents.');
        }

        $this->content .= $tag->render();

        return $this;
    }
89540
public static function createSimple(string $title, string $content): self
    {
        $card = new self(self::TYPE_SIMPLE);

        $card->title   = $title;
        $card->content = $content;

        return $card;
    }
1134394
public function setTitle($text, $tagName = 'h4')
    {
        $this->title = new Element($tagName, 'title');
        $this->title->entity->setEntityName($text);
        $this->title->textContent->push($text);

        return $this;
    }
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']));
    }
540667
public static function tag($tag, $content = null, array $attributes = array())
    {
        return self::openTag($tag, $attributes) . $content . self::closeTag($tag);
    }
357035
public static function a($href, $content = '', $title = '', $target = '', $options = [])
    {
        $a_tag_tpl = '<a href="%s" title="%s" target="%s"%s>%s</a>';
        return sprintf($a_tag_tpl, $href, $title, $target, self::assembleTagOptions($options), $content);
    }