/** * Get a text styled with one of bootstrap contextual backgrounds * @param string $content - The text * @param string $style - One of bootstrap styles e.g. primary * @param string $tag - In which tag the text will wrap in * @param array $options - Html options * @return $tag element with the $content */ public function getBackgroundText($content, $style, $tag = 'p', $options = []) { $css = GeneralFunctions::getBackgroundClass($style); $options['class'] = GeneralFunctions::combineValues($options, 'class', $css); return $this->Html->tag($tag, $content, $options); }