diff --git a/UltiSnips/php.snippets b/UltiSnips/php.snippets index 5aa6c69..e6ef8de 100755 --- a/UltiSnips/php.snippets +++ b/UltiSnips/php.snippets @@ -6,21 +6,23 @@ debug($${1});${0} endsnippet snippet creerobjet "SPIP creation objet" +$t = [ + $0 +]; $tables['spip_$1s'] = [ 'type' => '${1:objet}', 'principale' => 'oui', 'table_objet_surnoms' => [], - 'field'=> [ + 'field'=> array_merge([ 'id_$1' => 'bigint(21) NOT NULL', - $0 'statut' => 'varchar(20) DEFAULT "" NOT NULL', 'maj' => 'TIMESTAMP' - ], + ], $t), 'key' => [ 'PRIMARY KEY' => 'id_$1', 'KEY statut' => 'statut', ], - 'champs_editables' => [], + 'champs_editables' => array_keys($t), 'champs_versionnes' => [], 'rechercher_champs' => [], 'join' => [],