diff options
Diffstat (limited to 'vendor/gipfl/icingaweb2/src/Icon.php')
-rw-r--r-- | vendor/gipfl/icingaweb2/src/Icon.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/vendor/gipfl/icingaweb2/src/Icon.php b/vendor/gipfl/icingaweb2/src/Icon.php new file mode 100644 index 0000000..0001e12 --- /dev/null +++ b/vendor/gipfl/icingaweb2/src/Icon.php @@ -0,0 +1,27 @@ +<?php + +namespace gipfl\IcingaWeb2; + +use ipl\Html\BaseHtmlElement; + +class Icon extends BaseHtmlElement +{ + protected $tag = 'i'; + + public function __construct($name, $attributes = null) + { + $this->setAttributes($attributes); + $this->getAttributes()->add('class', array('icon', 'icon-' . $name)); + } + + /** + * @param string $name + * @param array $attributes + * + * @return static + */ + public static function create($name, array $attributes = null) + { + return new static($name, $attributes); + } +} |