Get the activities supported by the format.

Here we ignore the modules that do not have a page of their own, like the label.

@return array array($module => $name of the module).
181467
public static function get_supported_activities() {
        $availabletypes = get_module_types_names();
        foreach ($availabletypes as $module => $name) {
            if (plugin_supports('mod', $module, FEATURE_NO_VIEW_LINK, false)) {
                unset($availabletypes[$module]);
            }
        }
        return $availabletypes;
    }
296474
final public function get_layout_definition() : array {

		$standard_fields = [];
		// Add heading field to module.
		if ( true === apply_filters( 'hogan/module/' . $this->name . '/heading/enabled', false ) ) {
			hogan_append_heading_field( $standard_fields, $this );
		}

		// Add lead field to module.
		if ( true === apply_filters( 'hogan/module/' . $this->name . '/lead/enabled', false ) ) {
			hogan_append_lead_field( $standard_fields, $this );
		}

		$sub_fields = array_merge(
			apply_filters( 'hogan/module/' . $this->name . '/fields_before', [] ),
			$standard_fields,
			$this->get_fields(),
			apply_filters( 'hogan/module/' . $this->name . '/fields_after', [] )
		);

		return [
			'key'        => $this->field_key,
			'name'       => $this->name,
			'label'      => $this->label,
			'display'    => apply_filters( 'hogan/module/' . $this->name . '/layout/display', 'block' ),
			'sub_fields' => apply_filters( 'hogan/module/' . $this->name . '/layout/sub_fields', $sub_fields ),
			'min'        => apply_filters( 'hogan/module/' . $this->name . '/layout/min', '' ),
			'max'        => apply_filters( 'hogan/module/' . $this->name . '/layout/max', '' ),
		];
	}
69837
protected function getSupportedHTTPMethods()
    {
        $methods = array_keys( $this->protocolActionMap );
        foreach ( $methods as &$method )
        {
            $method = strtoupper( str_replace( 'http-', '', $method ) );
        }
        return $methods;
    }
416821
public function getActualLinks(): array
	{
		$arr = [];
		if ($this instanceof Link) {
			$arr[] = $this;
		}
		$parent = $this->parent;
		if ($parent instanceof Item) {
			return array_merge($arr, $this->parent->getActualLinks());
		} else {
			return $arr;
		}
	}
379623
protected function get_module_names() {
        if ($this->_modnames !== null) {
            return $this->_modnames;
        }
        $this->_modnames = [];
        foreach ($this->cms as $cm) {
            $this->_modnames[$cm->modname] = $cm->modfullname;
        }
        return $this->_modnames;
    }
773177
public function getMissingCoreModules()
    {
        $modules = array();

        foreach ($this->coreModules as $module) {
            if (!$this->isLoadedModule($module)) {
                array_push($modules, $module);
            }
        }

        return $modules;
    }
683993
public static function getModuleList()
    {
        $app = \JFactory::getApplication();
        $Itemid = $app->input->getInt('Itemid');
        $groups = implode(',', \JFactory::getUser()->getAuthorisedViewLevels());
        $lang = \JFactory::getLanguage()->getTag();
        $clientId = (int) $app->getClientId();

        $db = \JFactory::getDbo();

        $query = new \stdClass;
        $query->select = array();
        $query->from = array();
        $query->join = array();
        $query->where = array();
        $query->order = array();

        $query->select[] = 'm.published, m.id, m.title, m.module, m.position, m.content, m.showtitle, m.params, mm.menuid';
        $query->from[] = '#__modules AS m';
        $query->join[] = '#__modules_menu AS mm ON mm.moduleid = m.id';
        $query->where[] = 'm.published = 1';

        $query->join[] = '#__extensions AS e ON e.element = m.module AND e.client_id = m.client_id';
        $query->where[] = 'e.enabled = 1';

        $date = \JFactory::getDate();
        $now = $date->toSql();
        $nullDate = $db->getNullDate();
        $query->where[] = '(m.publish_up = ' . $db->q($nullDate) . ' OR m.publish_up <= ' . $db->q($now) . ')';
        $query->where[] = '(m.publish_down = ' . $db->q($nullDate) . ' OR m.publish_down >= ' . $db->q($now) . ')';

        $query->where[] = 'm.access IN ('.$groups.')';
        $query->where[] = 'm.client_id = ' . $clientId;
        $query->where[] = '(mm.menuid = ' . (int) $Itemid . ' OR mm.menuid <= 0)';

        // Filter by language
        if ($app->isSite() && $app->getLanguageFilter())
        {
            $query->where[] = 'm.language IN (' . $db->q($lang) . ',' . $db->q('*') . ')';
        }

        $query->order[] = 'm.position, m.ordering';

        // Do 3rd party stuff to change query
        $app->triggerEvent( 'onCreateModuleQuery', array( &$query ) );

        $q = $db->getQuery(true);
        // convert array object to query object
        foreach ( $query as $type => $strings )
        {
            foreach ( $strings as $string )
            {
                if ( $type == 'join' )
                {
                    $q->{$type}( 'LEFT', $string );
                }
                else
                {
                    $q->{$type}( $string );
                }
            }
        }

        // Set the query
        $db->setQuery($q);

        try
        {
            $modules = $db->loadObjectList();
        }
        catch (\RuntimeException $e)
        {
            \JLog::add(\JText::sprintf('JLIB_APPLICATION_ERROR_MODULE_LOAD', $e->getMessage()), \JLog::WARNING, 'jerror');

            return array();
        }

        return $modules;
    }
1303879
public function activity_has_subtypes() {
        if (!($modname = $this->get_activitytype())) {
            return null;
        }
        $metadata = get_module_metadata($this->get_course(), self::get_supported_activities());
        foreach ($metadata as $key => $moduledata) {
            if (preg_match('/^'.$modname.':/', $key)) {
                return true;
            }
        }
        return false;
    }
671546
public function getImplementedMethods() {

        $supported_methods = $this->getConfiguration()->get('supported-http-methods');

        if ( is_null($supported_methods) ) $supported_methods = self::$supported_methods;

        if ( method_exists($this, 'any') ) {

            return $supported_methods;

        }

        $implemented_methods = [];

        foreach ( $supported_methods as $method ) {

            if ( method_exists($this, strtolower($method)) ) array_push($implemented_methods, $method);

        }

        return $implemented_methods;

    }
590457
public static function getAvailableModules()
    {
        if (!self::$_initialized) {
            self::init();
        }

        $result = [];

        foreach (self::$_modules as $ns => $module) {
            $result[] = [
                'namespace' => $ns,
                'name' => $module->name(),
                'description' => $module->description(),
                'group' => $module->group(),
                'icon' => $module->icon()
            ];
        }

        return $result;
    }
941137
public final function supported_formats() {
        $basic = $this->base_supported_formats();
        if (empty($this->supportedformats)) {
            $specific = array();
        } else if (!is_array($this->supportedformats)) {
            debugging(get_class($this) . ' has set a non array value of member variable supported formats - working around but should be fixed in code');
            $specific = array($this->supportedformats);
        } else {
            $specific = $this->supportedformats;
        }
        return portfolio_most_specific_formats($specific, $basic);
    }
275561
public function getAdminModules()
    {
        $modules = [];
        
        foreach ($this->getModules() as $id => $obj) {
            if ($obj instanceof Module && $obj instanceof AdminModuleInterface) {
                $modules[$id] = $obj;
            }
        }
        
        return $modules;
    }
151512
public function getContentModules()
    {
        return array_filter($this->getModules(), function (ModuleInterface $module) {
            return !($module instanceof AdministrationModuleInterface)
                && !($module instanceof SubmoduleInterface);
        });
    }
434147
protected function _getActiveModuleInfo()
    {
        if ($this->_aActiveModuleInfo === null) {
            $modulelist = oxNew(\OxidEsales\Eshop\Core\Module\ModuleList::class);
            $this->_aActiveModuleInfo = $modulelist->getActiveModuleInfo();
        }

        return $this->_aActiveModuleInfo;
    }
666769
public function getModules()
    {
        $arrModules = [];
        $objModules = $this->Database->execute("SELECT m.id, m.name, t.name AS theme FROM tl_module m LEFT JOIN tl_theme t ON m.pid=t.id ORDER BY t.name, m.name");

        while ($objModules->next())
        {
            $arrModules[$objModules->theme][$objModules->id] = $objModules->name . ' (ID ' . $objModules->id . ')';
        }

        return $arrModules;
    }
929593
public function getFormats(): array {
        $meta    = $this->getMetadata();
        $formats = array();
        foreach ($meta->all(RC::get('fedoraServiceRetFormatProp')) as $i) {
            $formats[] = new Format((string) $i);
        }
        return $formats;
    }
386069
public final function get_activity_type() {
        $class = get_class($this);
        $package = stristr($class, "\\", true);
        $type = str_replace("mod_", "", $package);
        if ($type === $package) {
            throw new \coding_exception("$class does not belong to any module specific namespace");
        }
        return $type;
    }