Get all module slugs.

@return \Illuminate\Support\Collection
193628
public function slugs()
    {
        $slugs = collect();

        $this->all()->each(function ($item, $key) use ($slugs) {
            $slugs->push(strtolower($item['slug']));
        });

        return $slugs;
    }
819907
public function getLogCollection($slug)
    {
        foreach ($this->logCollections as $logCollection) {
            if ($logCollection->getSlug() == $slug) {
                return $logCollection;
            }
        }
    }
631349
public static function getSrcModules()
    {
        $modules = [];
        foreach (new \DirectoryIterator(BASE_PATH . 'src') as $module) {
            if (!$module->isDir() || $module->isDot() || !self::_moduleValid($module->getPathname())) {
                continue;
            }
            $modules[] = $module->getPathname();
        }
        return $modules;
    }
110849
public function getModules(){
        if($this->loadModules != 'ALL'){
            $this->connection->select('name');
            $this->connection->from($this->tableModule);
            $modules= $this->connection->get()->fetchAll(\PDO::FETCH_ASSOC);
            foreach ($modules as $module) {
                $this->getModule($module['name']);
            }
            $this->loadModules= 'ALL';
        }
        return $this->modules;
    }
436740
private function coreModules(): Collection
    {
        return Collection::make(self::CORE_MODULES)
            ->map(static function (string $class, string $name): ModuleInterface {
                $module = app($class);

                $module->setName($name);

                return $module;
            });
    }
1033415
public function getAll()
    {
        $result = $this->wsClient->invokeOperation('listtypes', [ ], 'GET');
        $modules = $result[ 'types' ];

        $result = array();
        foreach ($modules as $moduleName) {
            $result[ $moduleName ] = [ 'name' => $moduleName ];
        }
        return $result;
    }
1225620
public function modules()
    {
        $modules = [];

        foreach ($this->modulesToCheck as $module) {
            $modules[$module] = in_array('mod_' . $module, apache_get_modules());
        }

        return $modules;
    }
635407
public function deletedModules(): Collection
    {
        $database_modules = DB::table('module')->pluck('module_name');

        $disk_modules = $this->all(true)
            ->map(static function (ModuleInterface $module): string {
                return $module->name();
            });

        return $database_modules->diff($disk_modules);
    }
1121414
public function getModules($inited=false)
	{
	    if ($inited) {
	        $instances = [];
	        if ($this->_modules) foreach ($this->_modules as $v) {
	            $instances[] = $this->getModule($v);
	        }
	        return $instances;
	    }
	    
		return $this->_modules;
	}
37607
public function getControllersModules() : array {
		$result = self::$cached_modules[$this->controller_data['module_code']]['module_ids'];
		// filter
		foreach ($result as $k => $v) {
			// determine action
			$action = $this->method_code == 'Edit' ? 'Record_View' : 'List_View';
			if (!$this->can($action, $this->method_code, $k)) {
				unset($result[$k]);
			}
		}
		// sort
		return \Object\Data\Common::buildOptions($result, ['name' => 'name'], [], ['i18n' => true]);
	}
904951
public function getAllModules(\MultiColumnWizard $multiColumnWizard = null): array
    {
        if ($multiColumnWizard
            && $multiColumnWizard->dataContainer
            && $multiColumnWizard->dataContainer->activeRecord) {
            $collection = ModuleModel::findBy(
                ['tl_module.pid = ?', 'tl_module.id != ?'],
                [
                    $multiColumnWizard->dataContainer->activeRecord->pid,
                    $multiColumnWizard->dataContainer->activeRecord->id
                ]
            );
        } else {
            $collection = ModuleModel::findAll();
        }

        $modules = [
            'grid' => [
                'separator' => $GLOBALS['TL_LANG']['tl_module']['bs_separatorTitle']
            ]
        ];

        if ($collection) {
            foreach ($collection as $model) {
                $label = isset($GLOBALS['TL_LANG']['FMD'][$model->type][0])
                    ? $GLOBALS['TL_LANG']['FMD'][$model->type][0]
                    : $model->type;

                $modules['module'][$model->id] = sprintf('%s [%s]', $model->name, $label);
            }
        }

        return $modules;
    }
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;
    }
915402
public function getAllRoutes()
    {
        $routes = [];
        foreach ($this->getRoutes() as $path => $route) {
            if (array_key_exists('slug', $route)) {
                $routes[$route['slug']] = $path;
            }
        }
        return $routes;
    }
403599
public function getModulesMap()
    {
        if ($this->_modulesMap === null) {
            $this->_modulesMap = NavItemModule::find()->select(['module_name', 'id'])->indexBy('id')->asArray()->all();
        }
        
        return $this->_modulesMap;
    }
151512
public function getContentModules()
    {
        return array_filter($this->getModules(), function (ModuleInterface $module) {
            return !($module instanceof AdministrationModuleInterface)
                && !($module instanceof SubmoduleInterface);
        });
    }
545467
private function getModules()
    {
        $modules = (array)$this->xml->xpath('/draggy/module');

        $r = '';

        foreach ($modules as $module) {
            $moduleAttributes = (array)$module;
            $moduleAttributes = (array)$moduleAttributes['@attributes'];

            $this->checkMandatoryAttributes('Modules', $moduleAttributes, ['name', 'left', 'top', 'width', 'height']);

            $moduleName = $moduleAttributes['name'];

            $r .= 'var o = new Container(\'' . str_replace('\\', '\\\\', $moduleName) . '\');' . PHP_EOL;
            $r .= 'o.moveTo(\'' . ( $moduleAttributes['left'] - 1 ) . 'px\',\'' . ( $moduleAttributes['top'] - 1 ) . 'px\',\'' . $moduleAttributes['width'] . 'px\',\'' . $moduleAttributes['height'] . 'px\')' . PHP_EOL;

            $this->modules[]                    = $moduleName;
            $this->insideClasses[$moduleName]   = [];
            $this->insideAbstracts[$moduleName] = [];
        }

        return $r;
    }
409504
public static function getModules()
    {
        return \Cache::remember('modules', 604800, function ()
        {
            $diskModules = Module::getModulesFromDisk();
            if ($diskModules)
                return self::checkModulesInDb($diskModules);
            else
                return [];
        });
    }