/** * Get an anchor styled as bootstrap button * @param string $style - The bootstrap button style * @param string $title - The button's value * @param mixed $path - Either the string location, or a routing array. * @param array $options - Html options * @param bool $isBlock - true to use block class * @param string $size - One of 'lg','sm','xs' to set the size of the button * @return input tag type="button" */ public function getAnchorButton($style, $title, $path, $options = [], $isBlock = false, $size = null) { $css = GeneralFunctions::getButtonClass($style); $options['class'] = GeneralFunctions::combineValues($options, 'class', $css); if ($size) { $sizeClass = GeneralFunctions::getButtonSizeClass($size); $options['class'] = GeneralFunctions::combineValues($options, 'class', $sizeClass); } if ($isBlock) { $options['class'] = GeneralFunctions::combineValues($options, 'class', BootstrapClasses::BUTTON_BLOCK); } return $this->Html->link($title, $path, $options); }