CurrencyController::actionCreate PHP Method

actionCreate() public method

If creation is successful, the browser will be redirected to the 'view' page.
public actionCreate ( )
    public function actionCreate()
    {
        $model = new Currency();
        // Uncomment the following line if AJAX validation is needed
        // $this->performAjaxValidation($model);
        if (isset($_POST['Currency'])) {
            $model->attributes = $_POST['Currency'];
            if ($model->save()) {
                $this->redirect(array('view', 'id' => $model->currency_id));
            }
        }
        $this->render('create', array('model' => $model));
    }