public function getAllModules()
    {
        $modules = [];
        $moduleCollection = $this->collectionFactory->create()->getData();
        foreach ($moduleCollection as $module) {
            $modules[] = $module;
        }
        return $modules;
    }
public function getAllModules()
    {
        $modules = [];
        $moduleCollection = $this->collectionFactory->create()->getData();
        foreach ($moduleCollection as $module) {
            $modules[] = $module;
        }
        return $modules;
    }
Returns all module data from database

@return array