maj de creerobjet, pour gerer facilement les champs_editables
This commit is contained in:
parent
64507999cd
commit
48a2ba74d4
1 changed files with 6 additions and 4 deletions
|
@ -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' => [],
|
||||
|
|
Loading…
Add table
Reference in a new issue