public function getAllUserOrders()
    {
        if (!\Yii::$app->user->isGuest && $this->saveToDataBase === true) {
            $orders = Order::find()
                ->where(['user_id' => \Yii::$app->user->id])
                ->andWhere(['!=', 'status', OrderStatus::STATUS_INCOMPLETE])->all();
            return $orders;
        } else return false;
    }
public function getAllUserOrders()
    {
        if (!\Yii::$app->user->isGuest && $this->saveToDataBase === true) {
            $orders = Order::find()
                ->where(['user_id' => \Yii::$app->user->id])
                ->andWhere(['!=', 'status', OrderStatus::STATUS_INCOMPLETE])->all();
            return $orders;
        } else return false;
    }
public function getAllUserOrders ( ) { if ( ! \ Yii :: $ app -> user -> isGuest && $ this -> saveToDataBase === true ) { $ orders = Order :: find ( ) -> where ( [ 'user_id' => \ Yii :: $ app -> user -> id ] ) -> andWhere ( [ '!=' , 'status' , OrderStatus :: STATUS_INCOMPLETE ] ) -> all ( ) ; return $ orders ; } else return false ; }
Gets all user orders from database.

@return bool|\yii\db\ActiveRecord[]
Gets all user orders from database .