common\models\Goods::getIsPromotionList PHP Метод

getIsPromotionList() публичный статический Метод

public static getIsPromotionList ( )
    public static function getIsPromotionList()
    {
        if (self::$_isPromotionList === null) {
            self::$_isPromotionList = [self::BOOL_TRUE => '促销', self::BOOL_FALSE => '非促销'];
        }
        return self::$_isPromotionList;
    }

Usage Example

Пример #1
0
}
?>
        <?php 
echo $form->field($model, 'sales');
?>
        <?php 
echo $form->field($model, 'unit');
?>
        <?php 
echo $form->field($model, 'is_new')->dropDownList(Goods::getIsNewList());
?>
        <?php 
echo $form->field($model, 'is_hot')->dropDownList(Goods::getIsHotList());
?>
        <?php 
echo $form->field($model, 'is_promotion')->dropDownList(Goods::getIsPromotionList());
?>
        <div class="form-group">
            <?php 
echo Html::submitButton('<i class="fa fa-floppy-o"></i> 保存', ['class' => 'btn btn-primary']);
?>
            <?php 
echo $model->isNewRecord ? '' : Html::a('更新商品图片', ['/goods/img', 'id' => $model->id], ['class' => 'text-warning']);
?>
        </div>
    <?php 
ActiveForm::end();
?>
    </div>
</div>
<?php