コード例 #1
0
ファイル: Filter.php プロジェクト: black-lamp/blcms-shop
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getInputType()
 {
     return $this->hasOne(FilterInputType::className(), ['id' => 'input_type']);
 }
コード例 #2
0
}
?>
    </table>

    <table class="table table-bordered table-condensed table-stripped table-hover">
        <tr>
            <td class="col-md-5">
                <?php 
echo $form->field($newFilter, 'filter_type')->dropDownList(ArrayHelper::map(FilterType::find()->all(), 'id', function ($model) {
    return \Yii::t('shop', $model->title);
}))->label(false);
?>
            </td>
            <td class="col-md-5">
                <?php 
echo $form->field($newFilter, 'input_type')->dropDownList(ArrayHelper::map(FilterInputType::find()->all(), 'id', function ($model) {
    return \Yii::t('shop', $model->title);
}))->label(false);
?>
            </td>
            <td class="col-md-2 text-center">
                <?php 
echo Html::submitButton(Yii::t('shop', 'Add'), ['class' => 'btn btn-primary']);
?>
            </td>
        </tr>
    </table>

    <hr>

<?php