0

magento system.xml で宣言したテキスト フィールドを確認または検証する方法 テキスト フィールドに単語を入力して [設定の保存] ボタンを押すと、「これは予約語です」というメッセージが表示されます。system.xml text field.over コードに対してこの関数を呼び出したり設定したりできる場所。

public function isReserveWord($word) {

    $is_reserved = false;
    $reserve_words = array('supportportal','view','search','askquestion');
    if (in_array($word,$reserve_words)) {
    $is_reserved = true;}
    return $is_reserved;}
4

1 に答える 1