You are here

function mollie_payment_menu in Mollie Payment 7.2

Same name and namespace in other branches
  1. 7 mollie_payment.module \mollie_payment_menu()

Implements hook_menu().

File

./mollie_payment.module, line 119
Provides Mollie integration for the Payment platform.

Code

function mollie_payment_menu() {
  $items = array();

  // Endpoints.
  $items[MOLLIE_PAYMENT_RETURN_PATH] = array(
    'page callback' => 'mollie_payment_return',
    'page arguments' => array(
      3,
    ),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items[MOLLIE_PAYMENT_LISTENER_PATH] = array(
    'page callback' => 'mollie_payment_listener',
    'page arguments' => array(
      3,
    ),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );
  $items[MOLLIE_PAYMENT_RECURRING_LISTENER_PATH] = array(
    'page callback' => 'mollie_payment_recurring_listener',
    'page arguments' => array(
      4,
    ),
    'access callback' => TRUE,
    'type' => MENU_CALLBACK,
  );

  // Admin.
  $items['admin/config/services/mollie'] = array(
    'title' => 'Mollie',
    'description' => 'Receive payments using Mollie.',
    'page callback' => 'system_admin_menu_block_page',
    'access arguments' => array(
      'administer mollie payment',
    ),
    'file' => 'system.admin.inc',
    'file path' => drupal_get_path('module', 'system'),
  );
  $items['admin/config/services/mollie/account'] = array(
    'title' => 'Mollie account',
    'description' => 'Configure your default Mollie account.',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'mollie_payment_account_configuration_form',
    ),
    'access arguments' => array(
      'administer mollie payment',
    ),
    'file' => 'includes/mollie_payment.forms.inc',
    'weight' => 0,
  );

  // Callbacks.
  $items['admin/config/services/mollie/client-installer'] = array(
    'title' => 'Install Mollie API client for PHP',
    'description' => 'Automatically install the Mollie API client for PHP.',
    'page callback' => 'mollie_payment_client_installer',
    'access arguments' => array(
      'administer mollie payment',
    ),
    'weight' => 5,
  );
  $items['admin/config/services/mollie/warnings'] = array(
    'title' => 'Disable warnings',
    'description' => 'Disable warning messages about missing Mollie configuration.',
    'page callback' => 'mollie_payment_warnings',
    'access arguments' => array(
      'administer mollie payment',
    ),
    'weight' => 10,
  );
  return $items;
}