icingaweb2-module-director/library/vendor/ipl/Html/Icon.php

26 lines
514 B
PHP
Raw Normal View History

<?php
2017-10-09 15:23:27 +02:00
namespace dipl\Html;
class Icon extends BaseElement
{
protected $tag = 'i';
public function __construct($name, $attributes = null)
{
$this->setAttributes($attributes);
2018-05-05 00:18:45 +02:00
$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);
}
}