You are here

function paymentmethodbasic_payment_method_update in Payment 7

Implements hook_ENTITY_TYPE_ACTION().

File

modules/paymentmethodbasic/paymentmethodbasic.module, line 58
Hook implementations and shared functions.

Code

function paymentmethodbasic_payment_method_update(PaymentMethod $payment_method) {
  if ($payment_method->controller->name == 'PaymentMethodBasicController') {
    $query = db_update('paymentmethodbasic');
    $values = array_merge($payment_method->controller_data, array(
      'pmid' => $payment_method->pmid,
    ));
    $query
      ->fields($values);
    $query
      ->condition('pmid', $payment_method->pmid);
    $query
      ->execute();
  }
}