public function get_plugins_of_type($type) {
        global $CFG;

        $this->init_pluginsinfo_property();

        if (!array_key_exists($type, $this->pluginsinfo)) {
            return array();
        }

        if (is_array($this->pluginsinfo[$type])) {
            return $this->pluginsinfo[$type];
        }

        $types = core_component::get_plugin_types();

        if (!isset($types[$type])) {
            // Orphaned subplugins!
            $plugintypeclass = static::resolve_plugininfo_class($type);
            $this->pluginsinfo[$type] = $plugintypeclass::get_plugins($type, null, $plugintypeclass, $this);
            return $this->pluginsinfo[$type];
        }

        /** @var \core\plugininfo\base $plugintypeclass */
        $plugintypeclass = static::resolve_plugininfo_class($type);
        $plugins = $plugintypeclass::get_plugins($type, $types[$type], $plugintypeclass, $this);
        $this->pluginsinfo[$type] = $plugins;

        return $this->pluginsinfo[$type];
    }
public function get_plugins_of_type($type) {
        global $CFG;

        $this->init_pluginsinfo_property();

        if (!array_key_exists($type, $this->pluginsinfo)) {
            return array();
        }

        if (is_array($this->pluginsinfo[$type])) {
            return $this->pluginsinfo[$type];
        }

        $types = core_component::get_plugin_types();

        if (!isset($types[$type])) {
            // Orphaned subplugins!
            $plugintypeclass = static::resolve_plugininfo_class($type);
            $this->pluginsinfo[$type] = $plugintypeclass::get_plugins($type, null, $plugintypeclass, $this);
            return $this->pluginsinfo[$type];
        }

        /** @var \core\plugininfo\base $plugintypeclass */
        $plugintypeclass = static::resolve_plugininfo_class($type);
        $plugins = $plugintypeclass::get_plugins($type, $types[$type], $plugintypeclass, $this);
        $this->pluginsinfo[$type] = $plugins;

        return $this->pluginsinfo[$type];
    }
public function get_plugins_of_type ( $ type ) { global $ CFG ; $ this -> init_pluginsinfo_property ( ) ; if ( ! array_key_exists ( $ type , $ this -> pluginsinfo ) ) { return array ( ) ; } if ( is_array ( $ this -> pluginsinfo [ $ type ] ) ) { return $ this -> pluginsinfo [ $ type ] ; } $ types = core_component :: get_plugin_types ( ) ; if ( ! isset ( $ types [ $ type ] ) ) { // Orphaned subplugins! $ plugintypeclass = static :: resolve_plugininfo_class ( $ type ) ; $ this -> pluginsinfo [ $ type ] = $ plugintypeclass :: get_plugins ( $ type , null , $ plugintypeclass , $ this ) ; return $ this -> pluginsinfo [ $ type ] ; } /** @var \core\plugininfo\base $plugintypeclass */ $ plugintypeclass = static :: resolve_plugininfo_class ( $ type ) ; $ plugins = $ plugintypeclass :: get_plugins ( $ type , $ types [ $ type ] , $ plugintypeclass , $ this ) ; $ this -> pluginsinfo [ $ type ] = $ plugins ; return $ this -> pluginsinfo [ $ type ] ; }
Returns list of known plugins of the given type.

This method returns the subset of the tree returned by {@link self::get_plugins()}.
If the given type is not known, empty array is returned.

@param string $type plugin type, e.g. 'mod' or 'workshopallocation'
@return \core\plugininfo\base[] (string)plugin name (e.g. 'workshop') => corresponding subclass of {@link \core\plugininfo\base}
Returns list of known plugins of the given type .