Resources/contao/dca/tl_c4g_map_profiles.php
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;
    }
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;
    }
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 ; }
Get all modules and return them as array

@return array
Get all modules and return them as array