maj de creerobjet, pour gerer facilement les champs_editables

This commit is contained in:
Christophe 2022-09-13 10:16:53 +02:00
parent 64507999cd
commit 48a2ba74d4

View file

@ -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' => [],