Displays a Font Awesome icon.

@param FontAwesomeIconInterface $icon The icon.
@return string Returns the Font Awesome icon.
778842
protected function fontAwesomeIcon(FontAwesomeIconInterface $icon) {

        $attributes = [];

        $attributes["class"][] = FontAwesomeIconRenderer::renderFont($icon);
        $attributes["class"][] = FontAwesomeIconRenderer::renderName($icon);
        $attributes["class"][] = FontAwesomeIconRenderer::renderSize($icon);
        $attributes["class"][] = FontAwesomeIconRenderer::renderFixedWidth($icon);
        $attributes["class"][] = FontAwesomeIconRenderer::renderBordered($icon);
        $attributes["class"][] = FontAwesomeIconRenderer::renderPull($icon);
        $attributes["class"][] = FontAwesomeIconRenderer::renderAnimation($icon);
        $attributes["style"]   = FontAwesomeIconRenderer::renderStyle($icon);

        return static::coreHTMLElement("i", null, $attributes);
    }
529223
protected function renderIcon(array $item)
    {
        static $rendered = array();

        if (isset($rendered[$item['extension']])) {
            return $rendered[$item['extension']];
        }

        $template = "file_manager|icons/ext/{$item['extension']}";

        if ($item['type'] === 'dir') {
            $template = 'file_manager|icons/dir';
        }

        $data = array('item' => $item);
        $default = $this->controller->render('file_manager|icons/file', $data);
        $rendered[$item['extension']] = $this->controller->render($template, $data, true, $default);

        return $rendered[$item['extension']];
    }
413798
public function getIcon(string $key): string
    {
        if (preg_match('/^:/', $key)) {
            return $this->getMaterialIcon(str_replace(':', '', $key));
        }

        return sprintf('<i class="%s"></i>', $key);
    }
327594
private function resolveIcon(string $identifier): string
    {
        $config = null;

        $parameterName = $this->getConfigParameterName($identifier);
        if ($this->configResolver->hasParameter($parameterName)) {
            $config = $this->configResolver->getParameter($parameterName);
        }

        if ($config === null || empty($config[self::ICON_KEY])) {
            $config = $this->configResolver->getParameter(
                $this->getConfigParameterName(self::DEFAULT_IDENTIFIER)
            );
        }

        return $config[self::ICON_KEY];
    }
602303
public function setIcon($icon)
    {
        if (in_array(
            $icon,
            $this->validIcons
        )) {
            $this->icon = $icon;
        }

        return $this;
    }
1069082
public function addonIcon($icon, $options = [])
    {
        $prefix = array_get($options, 'prefix', $this->getIconPrefix());

        return '<div class="input-group-addon"><span ' . $this->html->attributes($options) . '><i class="'.$prefix.$icon.'"></i></span></div>';
    }
57670
protected function buildIcon(string $icon, bool $animated, array $cssClasses): string
    {
        return Html::buildHtmlElement('i', [], null, true, $this->getIconCssClasses($icon, $animated, $cssClasses));
    }
919987
public function getIcon()
    {
        $filename = $this->getFilename();
        $ext = pathinfo($filename, PATHINFO_EXTENSION);
        return File::get_icon_for_extension($ext);
    }
790690
protected function renderElementIcon(ElementInterface $element)
    {
        $render = '';
        $icon   = $element->getOption('icon');
        if ($icon) {
            $iconHelper = $this->getIconHelper();
            $render     = $iconHelper($icon);
        }
        return $render;
    }
1051121
protected function renderIcon($page)
    {
        $icon = $page->get('icon');
        if (!$icon) {
            return;
        }
        $iconHelper = $this->getIconHelper();
        return $iconHelper($icon);
    }
669343
public function getIcon($refName)
    {
        return $this->getValue(
            $refName,
            'icon',
            function ($page) {
                return $page instanceof TreeIconInterface ? $page->getIcon() : '';
            }
        );
    }
661475
public function getIcon($default = null, $show = true)
    {
        if ($this->icon !== null && $this->icon !== '' && $show == true ) {
            return '<i class="' . $this->icon . '"></i>';
        }
        if ($default === null && $show == true) {
            return $default;
        } else {
            return $this->icon;
        }
        return '<i class="' . $default . '"></i>';
    }
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;
	}
1002497
public static function iconByFileType($fileType)
    {


        foreach (self::$fileTypeIcons as $needle => $icon) {
            if (strpos($fileType, $needle) !== false) {
                return $icon;
            }
        }

        return 'file-o';
    }
1028779
public static function get_icon( $meta ) {
		$icon = '';

		// Icon type is not set.
		if ( empty( $meta['type'] ) ) {
			return $icon;
		}

		// Icon is not set.
		if ( empty( $meta['icon'] ) ) {
			return $icon;
		}

		// Icon type is not registered/enabled.
		if ( ! isset( self::$icon_types[ $meta['type'] ] ) ) {
			return $icon;
		}

		$type = self::$icon_types[ $meta['type'] ];

		$callbacks = array(
			array( $type, 'get_icon' ),
			array( __CLASS__, "get_{$type->id}_icon" ),
			array( __CLASS__, "get_{$type->template_id}_icon" ),
		);

		foreach ( $callbacks as $callback ) {
			if ( is_callable( $callback ) ) {
				$icon = call_user_func( $callback, $meta );
				break;
			}
		}

		return $icon;
	}
1098643
public function icon(Enum $enum)
    {
        return array_get(
            $this->map,
            sprintf('%s.%s', shorten(get_class($enum)), $enum->value()),
            config('konekt.app_shell.icon.default', 'default')
        );
    }
34479
protected function render_image_icon(image_icon $icon) {
        $system = \core\output\icon_system::instance(\core\output\icon_system::STANDARD);
        return $system->render_pix_icon($this, $icon);
    }