Get the readable name by icon class.

@param string|bool $icon_class

@return bool|string
195022
public function getIconName( $icon_class ) {
		$icon_class = $this->normalizeIconClass( $icon_class );
		$result     = false;

		if ( ! empty( $this->icons_array ) && array_key_exists( $icon_class, $this->icons_array ) ) {
			$result = $this->generateName( $icon_class );
		}

		return $result;
	}
956979
public static function generateIcon($icon, $class=null)
	{
		$key = $GLOBALS['BOOTSTRAP']['icons']['active'];

		return sprintf(
			$GLOBALS['BOOTSTRAP']['icons']['sets'][$key]['template'],
			$icon . ($class == null ? '' : ' ' . $class)
		);
	}
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),
        ]);
    }
685380
public function get_action_icons(stdClass $instance) {
        global $OUTPUT;

        $context = context_course::instance($instance->courseid);

        $icons = array();
        if (has_capability('enrol/manual:enrol', $context) or has_capability('enrol/manual:unenrol', $context)) {
            $managelink = new moodle_url("/enrol/manual/manage.php", array('enrolid'=>$instance->id));
            $icons[] = $OUTPUT->action_icon($managelink, new pix_icon('t/enrolusers', get_string('enrolusers', 'enrol_manual'), 'core', array('class'=>'iconsmall')));
        }
        $parenticons = parent::get_action_icons($instance);
        $icons = array_merge($icons, $parenticons);

        return $icons;
    }
272274
public function getClassNames()
    {
        $classes = array_merge(
            parent::getClassNames(),
            [
                $this->IconSizeClass,
                $this->CornerStyleClass
            ]
        );
        
        return $classes;
    }
707571
public function get_icon_system() {

        // Getting all the candidate functions.
        $system = false;
        if (isset($this->iconsystem) && \core\output\icon_system::is_valid_system($this->iconsystem)) {
            return $this->iconsystem;
        }
        foreach ($this->parent_configs as $parent_config) {
            if (isset($parent_config->iconsystem) && \core\output\icon_system::is_valid_system($parent_config->iconsystem)) {
                return $parent_config->iconsystem;
            }
        }
        return \core\output\icon_system::STANDARD;
    }
405143
public static function menu_icon_for_class($class)
    {
        $icon = Config::inst()->get($class, 'menu_icon');
        if (!empty($icon)) {
            $iconURL = ModuleResourceLoader::resourceURL($icon);
            $class = strtolower(Convert::raw2htmlname(str_replace('\\', '-', $class)));
            return ".icon.icon-16.icon-{$class} { background-image: url('{$iconURL}'); } ";
        }
        return '';
    }
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;
	}
48563
public function getIcon(string $path, $class) : string
    {
        if (file_exists($path . '/assets/icon.svg')) {
            return file_get_contents($path . '/assets/icon.svg');
        }

        // If fail to load (may happen on some systems) TODO: Make this more fancy
        if (file_exists($path . preg_replace('/\s+/', '', ucwords($class->nameSingular)). '/assets/icon.svg')) {
            return file_get_contents($path . preg_replace('/\s+/', '', ucwords($class->nameSingular)). '/assets/icon.svg');
        }

        return '';
    }
232284
public function getIcon()
    {
        $icon   = self::ICON_NO_NEW;
        $append = false;

        if ($this->locked) {
            $icon = self::ICON_LOCKED;
            $append = true;
        } elseif ($this->pinned) {
            $icon = self::ICON_PINNED;
            $append = true;
        } elseif ($this->posts >= Podium::getInstance()->podiumConfig->get('hot_minimum')) {
            $icon = self::ICON_HOT;
            $append = true;
        }
        if ($this->userView) {
            if ($this->new_post_at > $this->userView->new_last_seen) {
                if (!$append) {
                    $icon = self::ICON_NEW;
                }
            } elseif ($this->edited_post_at > $this->userView->edited_last_seen) {
                if (!$append) {
                    $icon = self::ICON_NEW;
                }
            }
        } else {
            if (!$append) {
                $icon = self::ICON_NEW;
            }
        }
        return $icon;
    }
254002
public function get_action_icons(stdClass $instance) {
        global $OUTPUT;

        $icons = array();
        if ($this->use_standard_editing_ui()) {
            $linkparams = array('courseid' => $instance->courseid, 'id' => $instance->id, 'type' => $instance->enrol);
            $editlink = new moodle_url("/enrol/editinstance.php", $linkparams);
            $icons[] = $OUTPUT->action_icon($editlink, new pix_icon('t/edit', get_string('edit'), 'core',
                array('class' => 'iconsmall')));
        }
        return $icons;
    }
850526
public function getBundleName($class)
    {
        $reflector = new \ReflectionClass(get_class($class));

        return ($p1 = strpos($ns = $reflector->getNamespaceName(), '\\')) === false ? $ns :
            substr($ns, 0, ($p2 = strpos($ns, '\\', $p1 + 1)) === false ? strlen($ns) : $p2);
    }
978539
protected function normalizeIconClass( $icon_class ) {
		$icon_class = trim( $icon_class );

		if ( stripos( $icon_class, 'fa-' ) === false ) {
			$icon_class = 'fa-' . $icon_class;
		}

		return $icon_class;
	}
995627
public static String getLoadableName( TypeDeclaration jclass )
    {
        TypeDeclaration containingClass = jclass.getDeclaringType();
        
        if ( containingClass == null )
        {
            return jclass.getQualifiedName();
        }
        else
        {
            return getLoadableName( containingClass ) + '$' + jclass.getSimpleName();
        }
    }
847408
public function getIconByExtension(string $extension, bool $include_full_path = false): string
    {
        $data = $this->getData();
        $extension = strtolower($extension);
        $res = $data[$extension] ?? '';

        if (!$res) {
            $res = $this->unknown_extension_icon;
        }

        if ($include_full_path) {
            $res = $this->directory_with_icons . $res;
        }

        return $res;
    }
146209
public function get_props() {
		$props = array(
			'id'         => $this->id,
			'name'       => $this->name,
			'controller' => $this->controller,
			'templateId' => $this->template_id,
			'data'       => $this->get_props_data(),
		);

		/**
		 * Filter icon type properties
		 *
		 * @since 0.1.0
		 * @param array            $props Icon type properties.
		 * @param string           $id    Icon type ID.
		 * @param Icon_Picker_Type $type  Icon_Picker_Type object.
		 */
		$props = apply_filters( 'icon_picker_type_props', $props, $this->id, $this );

		/**
		 * Filter icon type properties
		 *
		 * @since 0.1.0
		 * @param array            $props Icon type properties.
		 * @param Icon_Picker_Type $type  Icon_Picker_Type object.
		 */
		$props = apply_filters( "icon_picker_type_props_{$this->id}", $props, $this );

		return $props;
	}
951169
public static function alert($html, $class = 'info', $icon = '')
		{
			if(is_bool($class))
			{
				$state  = !! $class;
				$class  = $state ? 'success' : 'danger';
				$icon   = $state ? 'check' : 'times';
			}
			if ($icon)
			{
				$html   = '<i class="fa fa-' .$icon. '" aria-hidden="true"></i> ' . $html;
			}
			return '<div class="alert alert-' .$class. '" role="alert">' .$html. '</div>';
		}