diff --git a/src/View/Helper/BootstrapHtmlHelper.php b/src/View/Helper/BootstrapHtmlHelper.php
index cb42e8e..1f02419 100644
--- a/src/View/Helper/BootstrapHtmlHelper.php
+++ b/src/View/Helper/BootstrapHtmlHelper.php
@@ -49,8 +49,8 @@ public function __construct (\Cake\View\View $view, array $config = []) {
* @param $icon Name of the icon.
*
**/
- public function icon ($icon) {
- return $this->_useFontAwesome ? $this->faIcon($icon) : $this->glIcon($icon);
+ public function icon ($icon, $options = array()) {
+ return $this->_useFontAwesome ? $this->faIcon($icon, $options) : $this->glIcon($icon, $options);
}
/**
@@ -58,8 +58,11 @@ public function icon ($icon) {
*
* @param $icon Name of the icon.
*/
- public function faIcon ($icon) {
- return '' ;
+ public function faIcon ($icon, $options = array()) {
+ $options = $this->addClass($options, 'fa');
+ $options = $this->addClass($options, 'fa-'.$icon);
+
+ return $this->tag('i', '', $options);
}
/**
@@ -67,8 +70,11 @@ public function faIcon ($icon) {
*
* @param $icon Name of the icon.
*/
- public function glIcon ($icon) {
- return '';
+ public function glIcon ($icon, $options = array()) {
+ $options = $this->addClass($options, 'glyphicon');
+ $options = $this->addClass($options, 'glyphicon-'.$icon);
+
+ return $this->tag('i', '', $options);
}
/**