Get list modules

@param model $modulesModel
@return array
553316
protected function getListModules($modulesModel)
    {
        $modules = array();
        foreach ($modulesModel as $module)
        {
            $modules[$module->module_name]['name'] = $this->def($module->module_name, 'name');
            $modules[$module->module_name]['icon'] = $this->getConfig('assets').'/'.$module->module_name.'/'.$this->def($module->module_name, 'icon');
            $modules[$module->module_name]['description'] = $this->def($module->module_name, 'description');
            $modules[$module->module_name]['author'] = $this->def($module->module_name, 'author');
            $modules[$module->module_name]['website'] = $this->def($module->module_name, 'website');
            $modules[$module->module_name]['version'] = $this->def($module->module_name, 'version');
        }
        return $modules;
    }
760097
public static function getModelColumns(string $model = '', string $connectionManager = 'default'): array
    {
        $result = $columns = [];

        if (empty($model)) {
            return $result;
        }

        // making sure that model is in table naming conventions.
        $model = Inflector::tableize($model);

        try {
            $connection = ConnectionManager::get($connectionManager);
            $schema = $connection->getSchemaCollection();
            $table = $schema->describe($model);
            $columns = $table->columns();
        } catch (MissingDatasourceConfigException $e) {
            return $result;
        } catch (Exception $e) {
            return $result;
        }

        // A table with no columns?
        if (empty($columns)) {
            return $result;
        }

        foreach ($columns as $column) {
            $result[$column] = $column;
        }

        return $result;
    }
170090
public function get($module_id)
    {
        $modules = $this->getList();
        return empty($modules[$module_id]) ? array() : $modules[$module_id];
    }
92021
public function getModulesAsArray()
    {

        // initialize the array for the modules
        $modules = array();

        // iterate over the module nodes and sort them into an array
        /** @var \AppserverIo\Appserver\Core\Api\Node\ModuleNode $module */
        foreach ($this->getModules() as $module) {
            $modules[$module->getUuid()] = $module->getType();
        }

        // return the array
        return $modules;
    }
275561
public function getAdminModules()
    {
        $modules = [];
        
        foreach ($this->getModules() as $id => $obj) {
            if ($obj instanceof Module && $obj instanceof AdminModuleInterface) {
                $modules[$id] = $obj;
            }
        }
        
        return $modules;
    }
664127
public function changelogFor(Module $module)
    {
        $path = $module->getPath().'/CHANGELOG.md';
        if (! $this->finder->isFile($path)) {
            return [];
        }

        $parser = new \Changelog\Parser(file_get_contents($path));

        return $parser->getReleases();
    }
539067
public function getFrontendModules()
    {
        $modules = [];

        foreach ($this->getModules() as $id => $obj) {
            if ($obj instanceof Module && !$obj instanceof AdminModuleInterface && !$obj instanceof CoreModuleInterface) {
                $modules[$id] = $obj;
            }
        }

        return $modules;
    }
8014
public function getModules(FilterInterface $filter = null)
    {
        if ($filter !== null) {
            return $filter->filter($this->modules);
        }

        return $this->modules;
    }
860460
protected function _getOptionsFromModel($model)
    {
        $model = TableRegistry::get($model);

        if (method_exists($model, 'postType')) {
            $result = $model->postType();
            if ($result) {
                $result['table'] = $model->table();
            }
            return $result;
        }
        if (property_exists($model, 'postType')) {
            $result = $model->postType;
            if ($result) {
                $result['table'] = $model->table();
            }
            return $result;
        }
        return [];
    }
749176
protected function showModules(Collection $modules)
    {
        $table = [];
        $i     = 0;

        /** @var BaseModuleServiceProvider $module */
        foreach ($modules as $module) {
            $i++;

            $table[] = [
                'no'        => sprintf('%d.', $i),
                'name'      => $module->getManifest()->getName(),
                'kind'      => $module->getKind()->label(),
                'version'   => $module->getManifest()->getVersion(),
                'id'        => $module->getId(),
                'namespace' => $module->getNamespaceRoot()
            ];
        }

        $this->table($this->headers, $table);
    }
456219
public function getList(Model $model) {
        return $model->find('list', array(
            'order' => array($model->alias . '.' . $model->displayField => 'ASC'),
            'cache' => $model->alias . '::getList',
            'cacheExpires' => $this->getExpiration($model)
        ));
    }
1326326
public function get_lists($modulecode) {
        $modulecode = strtolower($modulecode);

        $lists = array();
        foreach ($this->_campus as $campus) {
            $result = $this->get_lists_for($modulecode, $campus);
            $lists = array_merge($lists, $result);
        }

        return $lists;
    }
958060
protected function getListModule($count = false)
    {
        $list = $this->module->getList();

        $this->checkDependenciesListModule($list);
        $this->prepareListModule($list);

        $allowed = $this->getAllowedFiltersModule();
        $this->filterList($list, $allowed, $this->query_filter);
        $this->sortList($list, $allowed, $this->query_filter, array('id' => 'asc'));

        if ($count) {
            return count($list);
        }

        $this->limitList($list, $this->data_limit);
        return $list;
    }
558583
public function getCoreModules($excludeModulesOnReturn = [])
    {
        $modules = [
            'melisdbdeploy' => 'MelisDbDeploy',
            'meliscomposerdeploy' => 'MelisComposerDeploy',
            'meliscore' => 'MelisCore',
            'melissites' => 'MelisSites',
            'melisassetmanager' => 'MelisAssetManager',
        ];

        if ($excludeModulesOnReturn) {
            foreach ($excludeModulesOnReturn as $exMod) {
                if (isset($modules[$exMod]) && $modules[$exMod]) {
                    unset($modules[$exMod]);
                }
            }
        }

        return $modules;
    }
1184551
public function getModulesIndex()
    {
        if ($this->modulesIndex) {
            return $this->modulesIndex;
        }

        $modules = $this->getModuleManager()->getModules();

        $modulesIndex = [];

        foreach ($modules as $moduleName) {
            $prepareModuleName = rtrim($moduleName, '\\') . '\\';
            $modulesIndex[$prepareModuleName] = strlen($prepareModuleName);
        }

        arsort($modulesIndex, SORT_NUMERIC);
        $this->modulesIndex = $modulesIndex;

        return $this->modulesIndex;
    }
1020544
public static function getNames($model) : Collection
    {
        if (is_object($model)) {
            $guardName = $model->guard_name ?? null;
        }

        if (! isset($guardName)) {
            $class = is_object($model) ? get_class($model) : $model;

            $guardName = (new \ReflectionClass($class))->getDefaultProperties()['guard_name'] ?? null;
        }

        if ($guardName) {
            return collect($guardName);
        }

        return collect(config('auth.guards'))
            ->map(function ($guard) {
                if (! isset($guard['provider'])) {
                    return;
                }

                return config("auth.providers.{$guard['provider']}.model");
            })
            ->filter(function ($model) use ($class) {
                return $class === $model;
            })
            ->keys();
    }
660416
public function modules()
    {
        $modules = new Collection;

        // Make meta module
        $modules->push(
            $this->makeMetaModuleInstance()
        );

        // Make model modules
        foreach ($this->repository->getAll() as $modelInformation) {
            $modules->push(
                $this->makeModuleInstance($modelInformation)
            );
        }

        return $modules;
    }