/**
  * This method accepts transaction type and adds the record.
  * Returns model if successfully created. 
  * Returns the error validated model if validation fails.
  * 
  * 
  * @param string $transactionType
  * @return model || model with errors
  */
 public static function create($transactionType)
 {
     $property_transactionTypes = new PropertyTransactionTypes();
     $property_transactionTypes->transaction_type = $transactionType;
     $property_transactionTypes->save();
     return $property_transactionTypes;
 }
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new PropertyTransactionTypes();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['PropertyTransactionTypes'])) {
         $model->attributes = $_POST['PropertyTransactionTypes'];
         if ($model->save()) {
             $this->redirect(array('view', 'id' => $model->id));
         }
     }
     $this->render('create', array('model' => $model));
 }