public function get_subplugins_of_plugin($component) {

        $pluginfo = $this->get_plugin_info($component);

        if (is_null($pluginfo)) {
            return array();
        }

        $subplugins = $this->get_subplugins();

        if (!isset($subplugins[$pluginfo->component])) {
            return array();
        }

        $list = array();

        foreach ($subplugins[$pluginfo->component] as $subdata) {
            foreach ($this->get_plugins_of_type($subdata->type) as $subpluginfo) {
                $list[$subpluginfo->component] = $subpluginfo;
            }
        }

        return $list;
    }
public function get_subplugins_of_plugin($component) {

        $pluginfo = $this->get_plugin_info($component);

        if (is_null($pluginfo)) {
            return array();
        }

        $subplugins = $this->get_subplugins();

        if (!isset($subplugins[$pluginfo->component])) {
            return array();
        }

        $list = array();

        foreach ($subplugins[$pluginfo->component] as $subdata) {
            foreach ($this->get_plugins_of_type($subdata->type) as $subpluginfo) {
                $list[$subpluginfo->component] = $subpluginfo;
            }
        }

        return $list;
    }
public function get_subplugins_of_plugin ( $ component ) { $ pluginfo = $ this -> get_plugin_info ( $ component ) ; if ( is_null ( $ pluginfo ) ) { return array ( ) ; } $ subplugins = $ this -> get_subplugins ( ) ; if ( ! isset ( $ subplugins [ $ pluginfo -> component ] ) ) { return array ( ) ; } $ list = array ( ) ; foreach ( $ subplugins [ $ pluginfo -> component ] as $ subdata ) { foreach ( $ this -> get_plugins_of_type ( $ subdata -> type ) as $ subpluginfo ) { $ list [ $ subpluginfo -> component ] = $ subpluginfo ; } } return $ list ; }
Returns list of all known subplugins of the given plugin.

For plugins that do not provide subplugins (i.e. there is no support for it),
empty array is returned.

@param string $component full component name, e.g. 'mod_workshop'
@return array (string) component name (e.g. 'workshopallocation_random') => subclass of {@link \core\plugininfo\base}
Returns list of all known subplugins of the given plugin .