You are here

function paymentreference_insert in Payment 7

Insert a Payment available for referencing through a field instance.

Parameters

string $entity_type: The entity_type for which the payment is available.

string $bundle: The bundle of $entity_type for which the payment is available.

string $field_name: The name of the field on $bundle for which the payment is available.

integer $pid: The PID of the available payment.

Return value

integer SAVED_NEW

3 calls to paymentreference_insert()
PaymentreferenceTestQueueWebTestCase::testQueueCRUD in modules/paymentreference/tests/paymentreference_test/tests/PaymentreferenceTestQueueWebTestCase.test
PaymentreferenceTestQueueWebTestCase::testQueueFieldImplementation in modules/paymentreference/tests/paymentreference_test/tests/PaymentreferenceTestQueueWebTestCase.test
paymentreference_payment_insert in modules/paymentreference/paymentreference.module
Implements hook_ENTITY_TYPE_ACTION().

File

modules/paymentreference/paymentreference.module, line 379
Hook implementations and general functions.

Code

function paymentreference_insert($entity_type, $bundle, $field_name, $pid) {
  $data = array(
    'entity_type' => $entity_type,
    'bundle' => $bundle,
    'field_name' => $field_name,
    'pid' => $pid,
  );
  return drupal_write_record('paymentreference', $data);
}