当前位置: 首页>>代码示例>>PHP>>正文


PHP Constants::GetLngArray方法代码示例

本文整理汇总了PHP中Constants::GetLngArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Constants::GetLngArray方法的具体用法?PHP Constants::GetLngArray怎么用?PHP Constants::GetLngArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Constants的用法示例。


在下文中一共展示了Constants::GetLngArray方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

 value="<?php 
    echo $value;
    ?>
"><?php 
    echo $typeName;
    ?>
</option>
                    <?php 
}
?>
                </select>
        </div>
        <div class="hr"></div>

        <?php 
foreach (Constants::GetLngArray() as $label => $lng) {
    ?>
        <label class="top-field-label">Название <?php 
    echo $label;
    ?>
:</label>
        <div class="field-container-long"><input type="text" name="name[<?php 
    echo $lng;
    ?>
]" class="input-main float-left" value="<?php 
    echo $item->getLngObject($lng)->name;
    ?>
"></div>
        <?php 
}
?>
开发者ID:ruslankus,项目名称:inlux-transfer,代码行数:31,代码来源:tree_edit.php

示例2: foreach

                <div class="field-container-long"><input type="text" name="word[<?php 
        echo $lng;
        ?>
]" class="input-main float-left" value="<?php 
        echo $item->getWordByLng($lng);
        ?>
"></div>
            <?php 
    }
    ?>
            <div class="hr"></div>
        <?php 
} else {
    ?>
            <?php 
    foreach (Constants::GetLngArray() as $indexLng => $lng) {
        ?>
                <label class="top-field-label"><?php 
        echo $indexLng;
        ?>
 :</label>
                <div class="field-container-long"><input type="text" name="word[<?php 
        echo $lng;
        ?>
]" class="input-main float-left" value=""></div>
            <?php 
    }
    ?>
            <div class="hr"></div>
        <?php 
}
开发者ID:ruslankus,项目名称:inlux-transfer,代码行数:31,代码来源:transedit.php

示例3: foreach

    <?php 
foreach ($words as $word) {
    ?>
    <tr>

        <td class="td-tbl-clr"><?php 
    echo $word->id;
    ?>
</td>
        <td class="td-tbl-clr"><?php 
    echo $word->label;
    ?>
</td>

        <?php 
    foreach (Constants::GetLngArray() as $lngIndex => $lng) {
        ?>
            <td class="td-tbl-clr"><?php 
        echo $word->getWordByLng($lng);
        ?>
</td>
        <?php 
    }
    ?>

        <td class="td-tbl-clr" style="text-align:center;">
            <?php 
    echo CHtml::link("Удалить", '/admin/lmt/transdel/id/' . $word->id, array('class' => 'button delete-lnk del-link', 'title' => 'удалить'));
    ?>
            <?php 
    echo CHtml::link("Изменить", '/admin/lmt/transedit/id/' . $word->id, array('class' => 'button edit-lnk', 'title' => 'редактировать'));
开发者ID:ruslankus,项目名称:inlux-transfer,代码行数:31,代码来源:translations.php

示例4: getTranslationFromWordOnSomeLng

 public static function getTranslationFromWordOnSomeLng($str, $toLng)
 {
     /* @var $lng TranslationLng */
     /* @var $word Translation */
     /* @var $neededWord Translation */
     $ret = "";
     $neededWord = null;
     $allWords = Translation::model()->findAll();
     foreach ($allWords as $word) {
         foreach (Constants::GetLngArray() as $lngIndex => $lng) {
             $strWord = $word->getWordByLng($lng);
             if ($str == $strWord) {
                 $neededWord = $word;
             }
         }
     }
     if ($neededWord != null) {
         $ret = $neededWord->getWordByLng($toLng);
     } else {
         $ret = $str;
     }
     return $ret;
 }
开发者ID:ruslankus,项目名称:inlux-transfer,代码行数:23,代码来源:Translation.php

示例5: actionUpdateContacts

 public function actionUpdateContacts()
 {
     /* @var $contacts LuxContactInfo */
     /* @var $contactsLng LuxContactInfoLng */
     $id = Yii::app()->request->getParam('id', null);
     $label = Yii::app()->request->getParam('label', null);
     $email_1 = Yii::app()->request->getParam('email_1', null);
     $phone_1 = Yii::app()->request->getParam('phone_1', null);
     $phone_2 = Yii::app()->request->getParam('phone_2', null);
     $email_admin = Yii::app()->request->getParam('email_admin', null);
     $map_link = Yii::app()->request->getParam('map_link', null);
     $small_text_lng = Yii::app()->request->getParam('info', array());
     $subject_lng = Yii::app()->request->getParam('subject', array());
     $title_lng = Yii::app()->request->getParam('title', array());
     $contacts = LuxContactInfo::model()->findByPk($id);
     if ($contacts == null) {
         $contacts = new LuxContactInfo();
     }
     $contacts->email_1 = $email_1;
     $contacts->phone_1 = $phone_1;
     $contacts->phone_2 = $phone_2;
     $contacts->administrator_email = $email_admin;
     $contacts->map_link = $map_link;
     $contacts->label = $label;
     $old_f_name = $contacts->map_image;
     $new_f_name = DwHelper::uploadPicAndGetPath($_FILES, 'map_img', $old_f_name);
     if ($new_f_name != "") {
         $contacts->map_image = $new_f_name;
     }
     if ($contacts->isNewRecord) {
         $contacts->save();
     } else {
         $contacts->update();
     }
     foreach (Constants::GetLngArray() as $lng) {
         $contactsLng = $contacts->getLngObject($lng);
         $contactsLng->small_text = $small_text_lng[$lng];
         $contactsLng->feedback_subject = $subject_lng[$lng];
         $contactsLng->text = $title_lng[$lng];
         if ($contactsLng->isNewRecord) {
             $contactsLng->save();
         } else {
             $contactsLng->update();
         }
     }
     $this->redirect($this->createUrl('/admin/inlux/contacts'));
 }
开发者ID:ruslankus,项目名称:inlux-transfer,代码行数:47,代码来源:InluxController.php

示例6: run

 public function run()
 {
     //render top menu widget
     $this->render('languages', array('languages' => Constants::GetLngArray()));
 }
开发者ID:ruslankus,项目名称:inlux-transfer,代码行数:5,代码来源:LanguagesWid.php

示例7: actionUpdateContacts

 public function actionUpdateContacts()
 {
     /* @var $contacts LmtContactInfo */
     /* @var $contactsLng LmtContactInfoLng */
     $id = Yii::app()->request->getParam('id', null);
     $email_1 = Yii::app()->request->getParam('email_1', null);
     $phone_1 = Yii::app()->request->getParam('phone_1', null);
     $phone_2 = Yii::app()->request->getParam('phone_2', null);
     $email_admin = Yii::app()->request->getParam('email_admin', null);
     $small_text_lng = Yii::app()->request->getParam('info', array());
     $subject_lng = Yii::app()->request->getParam('subject', array());
     $contacts = LmtContactInfo::model()->findByPk($id);
     if ($contacts == null) {
         $contacts = new LmtContactInfo();
     }
     $contacts->email_1 = $email_1;
     $contacts->phone_1 = $phone_1;
     $contacts->phone_2 = $phone_2;
     $contacts->administrator_email = $email_admin;
     if ($contacts->isNewRecord) {
         $contacts->save();
     } else {
         $contacts->update();
     }
     foreach (Constants::GetLngArray() as $lng) {
         $contactsLng = $contacts->getLngObject($lng);
         $contactsLng->small_text = $small_text_lng[$lng];
         $contactsLng->feedback_subject = $subject_lng[$lng];
         if ($contactsLng->isNewRecord) {
             $contactsLng->save();
         } else {
             $contactsLng->update();
         }
     }
     $this->redirect($this->createUrl('/admin/lmt/contacts'));
 }
开发者ID:ruslankus,项目名称:inlux-transfer,代码行数:36,代码来源:LmtController.php


注:本文中的Constants::GetLngArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。