Order::getPaidStatusList PHP Method

getPaidStatusList() public method

public getPaidStatusList ( ) : array
return array
    public function getPaidStatusList()
    {
        return [self::PAID_STATUS_PAID => Yii::t("OrderModule.order", 'Paid'), self::PAID_STATUS_NOT_PAID => Yii::t("OrderModule.order", 'Not paid')];
    }

Usage Example

Example #1
0
$this->widget('bootstrap.widgets.TbButton', ['buttonType' => 'submit', 'context' => 'primary', 'label' => $model->getIsNewRecord() ? Yii::t('CouponModule.coupon', 'Add coupon and continue') : Yii::t('CouponModule.coupon', 'Save coupon and continue')]);
?>

        <?php 
$this->widget('bootstrap.widgets.TbButton', ['buttonType' => 'submit', 'htmlOptions' => ['name' => 'submit-type', 'value' => 'index'], 'label' => $model->getIsNewRecord() ? Yii::t('CouponModule.coupon', 'Add coupon and close') : Yii::t('CouponModule.coupon', 'Save coupon and close')]);
?>

        <?php 
$this->endWidget();
?>
    </div>

    <?php 
if (!$model->getIsNewRecord()) {
    ?>
    <div class="tab-pane panel-body" id="history">

        <?php 
    Yii::app()->getModule('order');
    $order = new Order('search');
    $order->unsetAttributes();
    $this->widget('yupe\\widgets\\CustomGridView', ['id' => 'order-grid', 'type' => 'condensed', 'dataProvider' => $order->search($model->id), 'filter' => $order, 'rowCssClassExpression' => '$data->paid == Order::PAID_STATUS_PAID ? "alert-success" : ""', 'ajaxUrl' => Yii::app()->createUrl('/order/orderBackend/index'), 'actionsButtons' => false, 'bulkActions' => [false], 'columns' => [['name' => 'id', 'htmlOptions' => ['width' => '90px'], 'type' => 'raw', 'value' => 'CHtml::link(Yii::t("CouponModule.coupon", "Order #").$data->id, array("/order/orderBackend/update", "id" => $data->id))'], ['name' => 'name', 'type' => 'raw', 'value' => '$data->name . ($data->note ? "<br><div class=\\"note\\">$data->note</div>" : "")', 'htmlOptions' => ['width' => '400px']], 'total_price', ['name' => 'paid', 'value' => '$data->getPaidStatus()', 'filter' => $order->getPaidStatusList()], ['name' => 'date'], ['name' => 'status', 'type' => 'raw', 'value' => function ($data) {
        return $data->status->getTitle();
    }, 'filter' => OrderStatus::model()->getList()]]]);
    ?>
    </div>
    <?php 
}
?>
</div>
All Usage Examples Of Order::getPaidStatusList