You are here

function payment_line_item_get_prefixed in Payment 7

Implements PaymentLineItemInfo::callback.

File

./payment.module, line 962
Hook implementations and shared functions.

Code

function payment_line_item_get_prefixed($name, Payment $payment) {
  $selection = array();
  foreach ($payment->line_items as $line_item) {
    if (strpos($line_item->name, $name) === 0) {
      $selection[] = $line_item;
    }
  }
  return $selection;
}