public static function loaded($plugin = null)
    {
        if ($plugin !== null) {
            deprecationWarning(
                'Checking a single plugin with Plugin::loaded() is deprecated. ' .
                'Use Plugin::isLoaded() instead.'
            );

            return static::getCollection()->has($plugin);
        }
        $names = [];
        foreach (static::getCollection() as $plugin) {
            $names[] = $plugin->getName();
        }
        sort($names);

        return $names;
    }
public static function loaded($plugin = null)
    {
        if ($plugin !== null) {
            deprecationWarning(
                'Checking a single plugin with Plugin::loaded() is deprecated. ' .
                'Use Plugin::isLoaded() instead.'
            );

            return static::getCollection()->has($plugin);
        }
        $names = [];
        foreach (static::getCollection() as $plugin) {
            $names[] = $plugin->getName();
        }
        sort($names);

        return $names;
    }
public static function loaded ( $ plugin = null ) { if ( $ plugin !== null ) { deprecationWarning ( 'Checking a single plugin with Plugin::loaded() is deprecated. ' . 'Use Plugin::isLoaded() instead.' ) ; return static :: getCollection ( ) -> has ( $ plugin ) ; } $ names = [ ] ; foreach ( static :: getCollection ( ) as $ plugin ) { $ names [ ] = $ plugin -> getName ( ) ; } sort ( $ names ) ; return $ names ; }
Return a list of loaded plugins.

If a plugin name is provided, the return value will be a bool
indicating whether or not the named plugin is loaded. This usage
is deprecated. Instead you should use Plugin::isLoaded($name)

@param string|null $plugin Plugin name.
@return bool|array Boolean true if $plugin is already loaded.
If $plugin is null, returns a list of plugins that have been loaded
Return a list of loaded plugins .