Should the element has an icon?
@param  Html            $el
@param  string|null     $icon
@param  string          $name
@return void
776254
public function tryAddIcon(Html $el, $icon, $name)
	{
		if ($icon) {
			$el->addHtml(Html::el('span')->class(DataGrid::$icon_prefix . $icon));

			if (strlen($name)) {
				$el->addHtml('&nbsp;');
			}
		}
	}
1369639
public void setIcon(FontOpenCms icon, String color) {

        if (icon != null) {
            m_iconCell.setInnerHTML(icon.getHtml(32, color));
        } else {
            m_iconCell.setInnerHTML("");
        }
    }
524477
function GetHtmlAttribute($name)
        {
            if (isset($this->attributes[$name]))
                    return $this->attributes[$name];
            
            return null;
        }
162835
public function addicon($icon, $tag = 'i')
    {
        $icon = static::icon($icon, $tag);

        return $this->addElement($icon);
    }
659647
public function hasElement($name)
    {
        foreach($this->elements as $element){
            if($element->getName() == $name) {
                return true;
            }
        }

        return false;
    }
815669
public function removeElementByName($name, $index = null) {

		if($index !== null) {
			unset($this->elements[$name][$index]);
		}
		else {
			unset($this->elements[$name]);
		}

	}
561589
function (newIcon) {

            // check if initialization was successful
            if (!this._iconInfo) {
                return;
            }

            var iconInfo = this._getIconInfo(newIcon);
            // check
            if (iconInfo) {
                var domElt = this.getDom();
                domElt.style.cssText = this._getIconStyle(iconInfo);
                domElt.className = this._getIconClasses(iconInfo);
            }

            this._iconInfo = iconInfo;
        }
904206
static function laraform($html, $name = null) {
        $el = new ElementStaticTwbs($name ? $name : uniqid());
        $el->setValue($html);

        return $el;
    }
45747
public static function getScoreboardIcon( string $name, array $attributes = [] ): Html
	{
		self::checkInit();

		$attrs = array_merge([ 'alt' => $name ], self::getSetting(self::SET_CUSTOM_IMG_ATTRS, []), $attributes);
		$attrs['class'] = implode(' ', [
			self::getSetting(self::SET_DEFAULT_CLASS),
			self::getSetting(self::SET_UI_ICON_CLASS),
			@self::getSetting(self::SET_CUSTOM_IMG_ATTRS, [])['class'],
			@$attributes['class'],
		]);
		$attrs['src'] = self::getScoreboardIconUrl($name);

		return Html::el('img', $attrs);
	}
557347
protected function renderButton($name, $model, $key, $index)
    {
        if (!isset($this->buttons[$name])) {
            return '';
        }
        $button = $this->buttons[$name];

        if ($button instanceof \Closure) {
            $url = $this->createUrl($name, $model, $key, $index);
            return call_user_func($button, $url, $model, $key);
        }
        if (!is_array($button)) {
            throw new InvalidConfigException("Button should be either a Closure or array configuration.");
        }

        // Visibility :
        if (isset($button['visible'])) {
            if ($button['visible'] instanceof \Closure) {
                if (!call_user_func($button['visible'], $model, $key, $index)) {
                    return '';
                }
            } elseif (!$button['visible']) {
                return '';
            }
        }

        // URL :
        if (isset($button['url'])) {
            $url = call_user_func($button['url'], $name, $model, $key, $index);
        } else {
            $url = $this->createUrl($name, $model, $key, $index);
        }

        // label :
        if (isset($button['label'])) {
            $label = $button['label'];

            if (isset($button['encode'])) {
                $encodeLabel = $button['encode'];
                unset($button['encode']);
            } else {
                $encodeLabel = true;
            }
            if ($encodeLabel) {
                $label = Html::encode($label);
            }
        } else {
            $label = '';
        }

        // icon :
        if (isset($button['icon'])) {
            $icon = $button['icon'];
            $label = Html::icon($icon) . (empty($label) ? '' : ' ' . $label);
        }

        $options = array_merge(ArrayHelper::getValue($button, 'options', []), $this->buttonOptions);

        return Html::a($label, $url, $options);
    }
152906
function Icon(el, config) {
    // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>.
    if (el && el.tagName.toLowerCase() === 'symbol') {
      var viewbox = el.getAttribute('viewBox');
      // // Check if innerHTML is supported as IE11 does not support innerHTML on SVG elements.
      if (el.innerHTML) {
        el = angular.element('<svg xmlns="http://www.w3.org/2000/svg">')
          .html(el.innerHTML)[0];
      } else {
        el = angular.element('<svg xmlns="http://www.w3.org/2000/svg">')
          .append($mdUtil.getInnerHTML(el))[0];
      }
      if (viewbox) el.setAttribute('viewBox', viewbox);
    }

    if (el && el.tagName.toLowerCase() !== 'svg') {
      el = angular.element(
        '<svg xmlns="http://www.w3.org/2000/svg">').append(el.cloneNode(true))[0];
    }

    // Inject the namespace if not available...
    if (!el.getAttribute('xmlns')) {
      el.setAttribute('xmlns', "http://www.w3.org/2000/svg");
    }

    this.element = el;
    this.config = config;
    this.prepare();
  }
1273088
public function addBreadcrumbLink($name, $url = '', $icon = '')
    {
        $this->breadcrumbItems->push((object) ['name' => $name, 'url' => $url, 'icon' => $icon]);
    }
1024655
public static Icon getStockIcon(String name) {
    SoftReference<Icon> ref = iconcache.get(name);
    if(ref != null) {
      Icon icon = ref.get();
      if(icon != null) {
        return icon;
      }
    }
    java.net.URL imgURL = StockIcon.class.getResource(name + ".png");
    if(imgURL != null) {
      Icon icon = new ImageIcon(imgURL);
      iconcache.put(name, new SoftReference<>(icon));
      return icon;
    }
    LoggingUtil.warning("Could not find stock icon: " + name);
    return null;
  }
428801
public static function createIcon(string $icon, array $arguments = null) {
		$element = Html::el("i");
		
		if($icon == "b" or $icon == "l" or $icon == "s" or $icon == "r") {
			// Markup of icon which use Font Awesome 5.
			$class = ["fa".$icon];
		} else {
			// Markup of icon which use Font Awesome 4.
			$class = ["fa fa-".$icon];
		}
		
		if(isset($arguments)) {
			foreach($arguments as $argument) {
				$class[] = "fa-".$argument;
			}
		}
		
		$element->addAttributes(["class" => $class, "aria-hidden" => "true"]);
		return $element;
	}
1235698
public static void setAtt(Element el, String name, int d) {
    el.setAttribute(name, Integer.toString(d));
  }
377882
public function getElement($name)
    {
        $elements = $this->getElements();

        return isset($elements[$name]) ? $elements[$name] : null;
    }
740652
public function hasAttribute($name)
    {
        if(strlen($name) < 1)
        {
            throw new HTMLTagException("Attribute name is empty");
        }

        return (isset($this->tag_attributes[strtolower($name)])) ? true : false;
    }