/** * Generates a blockquote. * * @param string $content the blockquote content * @param string $citeContent the content of the citation (optional) - this should typically * include the wildtag '{source}' to embed the cite source * @param string $citeTitle the cite source title (optional) * @param string $citeSource the cite source (optional) * @param array $options html options for the blockquote * * Example(s): * ~~~ * echo Html::blockquote( * 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.', * 'Someone famous in {source}', * 'International Premier League', * 'IPL' * ); * ~~~ * * @param array $options html options for the blockquote * * @see http://getbootstrap.com/css/#type-blockquotes * * @return string */ public static function blockquote($content, $citeContent = '', $citeTitle = '', $citeSource = '', $options = []) { $content = static::tag('p', $content); if (!Variables::isEmpty($citeContent)) { $source = static::tag('cite', $citeSource, ['title' => $citeTitle]); $content .= "\n<small>" . str_replace('{source}', $source, $citeContent) . "</small>"; } return static::tag('blockquote', $content, $options); }