You are here

pay_handler_argument_default_form.inc in Pay 7

Same filename and directory in other branches
  1. 6 includes/views/pay_handler_argument_default_form.inc

Contains the payment form from URL argument default plugin.

File

includes/views/pay_handler_argument_default_form.inc
View source
<?php

/**
 * @file
 * Contains the payment form from URL argument default plugin.
 */

/**
 * Default argument plugin to extract a pay_form via menu_get_object
 */
class pay_handler_argument_default_form extends views_plugin_argument_default {
  function get_argument() {
    $item = menu_get_item();
    foreach ($item['page_arguments'] as $object) {

      // If there's a 'pfid' key in the current page argument, assume it's a
      // payment form (TODO this would conflict with anything else using pfid!)
      if (is_object($object) && isset($object->pfid)) {
        return $object->pfid;
      }
      elseif (isset($object->pay_form)) {
        return $object->pay_form->pfid;
      }
    }
  }

}

Classes

Namesort descending Description
pay_handler_argument_default_form Default argument plugin to extract a pay_form via menu_get_object