/** * Create language table. * * @param string $table (default = 'language') * @param vector<string[2]> $language_list (default = [ de, en ]) */ public function createTable($table = 'language', $language_list = ['de', 'en']) { if ($this->db->hasTable($table)) { return; } $tconf = []; $tconf['@table'] = $table; $tconf['@timestamp'] = 2; $tconf['id'] = 'varchar:50::3'; $tconf['txt'] = 'text:::1'; foreach ($language_list as $lang) { $tconf[$lang] = 'text:::1'; } $this->db->createTable($tconf); }
/** * Create category table. Default conf: * * - @table=category * - @id=1 * - pid= int:::32 * - name= varchar:255::1 * * Don't change "@id" and "pid" in conf. For multilanguage use "@language" => 'de, en, ...' and "@multilang" => 'name'. * * @param map $conf * @see ADatabase::createTable() */ public function createTable($conf = ['@table' => 'category', '@id' => 1, 'pid' => 'int:::32', 'name' => 'varchar:255::1']) { $this->db->createTable($conf); }