public function clearPaymentMethods() { DeliveryPayment::model()->deleteAllByAttributes(['delivery_id' => $this->id]); }