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;
	}
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;
	}
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 ; }
Renders Font Awesome icon.
@param string $icon Name of the Font Awesome icon.
@param array $arguments Optional arguments for the icon (see https://fontawesome.com/how-to-use/on-the-web/styling).
@return Html HTML element with icon and its arguments.
Renders Font Awesome icon .