fetchArray('SELECT *, (SELECT directory FROM zz_modules WHERE id=idmodule_from) AS module_dir FROM zz_plugins'); $plugins = []; foreach ($results as $result) { $result['options'] = App::replacePlaceholder($result['options'], filter('id_parent')); $result['options2'] = App::replacePlaceholder($result['options2'], filter('id_parent')); $result['option'] = empty($result['options2']) ? $result['options'] : $result['options2']; $plugins[$result['id']] = $result; $plugins[$result['name']] = $result['id']; } self::$plugins = $plugins; } return self::$plugins; } /** * Restituisce le informazioni relative a un singolo modulo specificato. * * @param string|int $plugin * * @return array */ public static function get($plugin) { if (!is_numeric($plugin) && !empty(self::getPlugins()[$plugin])) { $plugin = self::getPlugins()[$plugin]; } return self::getPlugins()[$plugin]; } }