public function selectModule(array $options = [])
    {
        $modules = [];
        foreach (Yii::$app->getModules() as $id => $object) {
            if (!$object instanceof \luya\base\Module) {
                continue;
            }
            if (isset($options['onlyAdmin']) && $options['onlyAdmin']) {
                if (!$object instanceof AdminModuleInterface) {
                    continue;
                }
            }
    
            if (isset($options['hideCore']) && $options['hideCore']) {
                if ($object instanceof CoreModuleInterface) {
                    continue;
                }
            }
            $modules[$id] = $id;
        }
    
        $text = (isset($options['text'])) ? $options['text'] : 'Please select a module:';
    
        return $this->select($text, $modules);
    }