Sets the top icon to be used in a stack

@param  string $icon Icon label, omitting the "fa-" prefix
@param  array  $classes
@return \Khill\FontAwesome\FontAwesomeStack
181818
public function stack($icon, array $classes = array())
    {
        if (is_string($icon) === false) {
            throw new \InvalidArgumentException(
                'Icon label must be a string.'
            );
        }

        return new FontAwesomeStack($icon, $classes);
    }
438244
public function setIcon( $icon = null ) {
		if ( $this->iconName !== null ) {
			$this->icon->removeClasses( [ 'oo-ui-icon-' . $this->iconName ] );
		}
		if ( $icon !== null ) {
			$this->icon->addClasses( [ 'oo-ui-icon-' . $icon ] );
		}

		$this->iconName = $icon;
		$this->toggleClasses( [ 'oo-ui-iconElement' ], (bool)$this->iconName );
		$this->icon->toggleClasses( [ 'oo-ui-iconElement-noIcon' ], !$this->iconName );

		return $this;
	}
739831
public static function activeIcon($active, array $options = [], $withTooltip = true)
    {
        // TODO: Refactor the options to a dedicated config file.
        $classes      = Arr::get($options, 'classes', [
            'enabled'  => 'label label-success',
            'disabled' => 'label label-default',
        ]);
        $translations = Arr::get($options, 'trans', [
            'enabled'  => 'core::statuses.enabled',
            'disabled' => 'core::statuses.disabled',
        ]);
        $icons = Arr::get($options, 'icons', [
            'enabled'  => 'fa fa-fw fa-check',
            'disabled' => 'fa fa-fw fa-ban',
        ]);

        $key        = $active ? 'enabled' : 'disabled';
        $attributes = ['class' => $classes[$key]];
        $value      = static::generateIcon($icons[$key]);

        return $withTooltip
            ? static::generateWithTooltip($value, ucfirst(trans($translations[$key])), $attributes)
            : static::generate($value, $attributes);
    }
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);
    }
408879
public function setClass($className)
    {
        $this->attributes->removeAttributeClass($this->iconPrefixClass . '-*');
        $this->attributes->addAttributeClass($this->iconPrefixClass . '-' . $className);

        return $this;
    }
1166879
protected function fixIconsArray(array $icons)
    {
        $array = [];
        foreach ($icons as $rel => $data) {
            foreach ((array) $data['sizes'] as $size) {
                $array[] = array_merge_recursive(
                    [
                        'rel'   => $rel,
                        'sizes' => "{$size}x{$size}",
                        'href'  => sprintf($data['pattern'], $size),
                    ],
                    (isset($data['attr']) ? $data['attr'] : [])
                );
            }
        }
        return $array;
    }
1006003
public static function icon($icon, $type = self::FONT_AWESOME)
    {
        $class = null;

        if ($type === self::FONT_AWESOME) {
            $class = 'fa fa-' . $icon;

        }
        else if ($type === self::FONT_BOOTSTRAP) {
            $class = 'glyphicon glyphicon-' . $icon;
        }
        else {
            $class = $icon;
        }

        return self::tag('i', '', $class, '');
    }
714957
public function iconFunction($icon, $iconSet = 'icon')
    {
        if ($iconSet == 'icon') {
            $iconSet = $this->iconPrefix;
        }
        $icon = str_replace('+', ' '.$iconSet.'-', $icon);

        return sprintf('<%1$s class="%2$s %2$s-%3$s"></%1$s>', $this->iconTag, $iconSet, $icon);
    }
865165
public function getIcon( $icon_class ) {
		$icon_class = $this->normalizeIconClass( $icon_class );
		$result     = false;

		$icons = $this->getAllData();

		if ( ! empty( $icons ) && array_key_exists( $icon_class, $icons ) ) {
			$result = $icons[ $icon_class ];
		}

		return $result;
	}
1101920
public function setFooter($text, $icon = null)
    {
        $this->data['footer'] = $text;
        if ($icon) {
            $this->data['footer_icon'] = $icon;
        }

        return $this;
    }
1042315
public function setLabel($label)
    {
        if (is_array($label) && $label['icon']) {
            $this->setIcon($label['icon']);
        } elseif (is_string($label)) {
            return $this->setText($label);
        }

        return $this;
    }
77241
public function icon($icon = 'home', array $options = [])
    {
        $iconPref = $this->_configRead('iconPref');
        $_classes = [
            $this->_class(__FUNCTION__),
            $iconPref,
            $iconPref . '-' . $icon,
        ];

        $options = $this->_addClass($options, implode(' ', $_classes));
        $classes = $options['class'];
        unset($options['class']);

        $templater = $this->templater();
        return $templater->format(__FUNCTION__, [
            'class' => $classes,
            'attrs' => $templater->formatAttributes($options),
        ]);
    }
146641
public function setClassAttr($classes)
    {
        if (is_array($classes)) {
            $classes = implode(' ', $classes);
        }

        $this->classAttr = $classes;

        return $this;
    }
735492
public function icon($icon, $color = null, bool $animated = null):self
    {
        Checkers::checkIcon($icon, null, $this->iconIsNullable);
        $this->icon = $icon;
        $this->setIconColor($color);
        $this->iconAnimated = $animated !== null ? $animated : $this->iconAnimated;
        return $this;
    }
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;
	}
512724
protected function initClasses()
    {
        $this->addClass('fa', '');

        if (is_string($this->icon)) {
            $this->addClass($this->icon);
        }
    }
1055789
public function icon($icon = null)
    {
        if (null !== $icon) {
            $this->icon = $icon;

            return $this;
        }

        return $this->icon;
    }