私はDrupalフォルダにたくさんの配列を作成したいと思います。しかし、私はこれを行う方法がわかりません。基本的には、常に同じ構造です。配列で配列を作る
$form['actions']['saveasdraft']['#type'] = 'submit';
$form['actions']['saveasdraft']['#access'] = true;
$form['actions']['saveasdraft']['#value'] = 'Save as Draft';
$form['actions']['saveasdraft']['#weight'] = 11;
$form['actions']['saveasdraft']['#submit'][0] = 'node_fiche_form_submit';
$form['actions']['saveascurrent']['#type'] = 'submit';
$form['actions']['saveascurrent']['#access'] = true;
$form['actions']['saveascurrent']['#value'] = 'Save as New version';
$form['actions']['saveascurrent']['#weight'] = 12;
$form['actions']['saveascurrent']['#submit'][0] = 'node_fiche_form_submit';
...
これは簡単な方法ですか?
正解!忘れてた。しかし、可能な限り少ないコードで100以上の配列を追加する方法はありますか? – Michiel
私はそれが助けてくれることを願って更新しました:) – Clive
はい、それは役に立ちます:-)多くありがとう!私は一度それ以上投票することができます;-) – Michiel