You are here

function _paypal_donate_installed_fields in Paypal Donation 7

Return a structured array defining the fields created by this content type.

This is packaged in a function so it can be used in both hook_install() and hook_uninstall().

2 calls to _paypal_donate_installed_fields()
paypal_donate_install in ./paypal_donate.install
This hook is triggered when the paypal donate module is being installed. This function will run only once and gives us the possibility to install the a required table in the database.
paypal_donate_uninstall in ./paypal_donate.install
This hook is triggered when the paypal donate module is being uninstalled. This function will run only once and gives us the possibility to remove the a required table in the database.

File

./paypal_donate.install, line 60
Install, update and uninstall functions for the paypal_donate module.

Code

function _paypal_donate_installed_fields() {
  $t = get_t();
  return array(
    'paypal_donate_email' => array(
      'field_name' => 'paypal_donate_email',
      'label' => $t('Email Address of the paypal account'),
      'type' => 'text',
      'required' => true,
    ),
    'paypal_donate_currency' => array(
      'field_name' => 'paypal_donate_currency',
      'label' => $t('Currency Code'),
      'required' => true,
      'type' => 'list_text',
      'settings' => array(
        'allowed_values' => array(
          'GBP' => 'Great British Pounds',
          'USD' => 'United States Doller',
          'AUD' => 'Australian Dollar',
          'CAD' => 'Canadian Dollar',
          'EUR' => 'Euro',
          'JPY' => 'Japanese Yen',
          'NZD' => 'New Zealand Dollar',
          'CHF' => 'Swiss Franc',
          'HKD' => 'Hong Kong Dollar',
          'SGD' => 'Singapore Dollar',
          'SEK' => 'Swedish Krona',
          'DKK' => 'Danish Krone',
          'PLN' => 'Polish Zloty',
          'NOK' => 'Norwegian Krone',
          'HUF' => 'Hungarian Forint',
          'CZK' => 'Czech Koruna',
          'ILS' => 'Israeli New Shekel',
          'MXN' => 'Mexican Peso',
          'BRL' => 'Brazilian Real',
          'MYR' => 'Malaysian Ringgit',
          'PHP' => 'Philippine Peso',
          'TWD' => 'New Taiwan Dollar',
          'THB' => 'Thai Baht',
          'TRY' => 'Turkish Lira',
        ),
      ),
      'display_settings' => array(
        'default' => false,
      ),
    ),
  );
}