/** * set all necessary information about the addon * @param $folder * @param $table * @param $tableCategory */ public static function init($folder, $table, $tableCategory) { global $REX; self::$folderName = $folder; self::$tableName = $REX['TABLE_PREFIX'] . $table; self::$tableNameCategory = $REX['TABLE_PREFIX'] . $tableCategory; self::$defaultConfigFile = rex_path::addon(self::$folderName, 'data/config.json'); self::$configFile = rex_path::addonData(self::$folderName, 'config.json'); self::$defaultConfig = json_decode(file_get_contents(self::$defaultConfigFile), true); self::$config = json_decode(file_get_contents(self::$configFile), true); self::setBaseUrl(); }