You are here

function _commerce_recurring_installed_fields in Commerce Recurring Framework 7

Returns a structured array defining the fields created by this module.

Return value

An associative array specifying the fields we wish to add to our entities

3 calls to _commerce_recurring_installed_fields()
commerce_recurring_install in ./commerce_recurring.install
Implements hook_install().
commerce_recurring_uninstall in ./commerce_recurring.install
Implements hook_schema(). / function commerce_recurring_schema() {
commerce_recurring_update_7001 in ./commerce_recurring.install
Implements hook_update_N Adds the payment status field to the recurring order

File

./commerce_recurring.install, line 93

Code

function _commerce_recurring_installed_fields() {
  $t = get_t();
  return array(
    'commerce_recurring_interval' => array(
      'field_name' => 'commerce_recurring_interval',
      'cardinality' => 1,
      'type' => 'interval',
    ),
    'commerce_recurring_parent_order' => array(
      'field_name' => 'commerce_recurring_parent_order',
      'cardinality' => 1,
      'type' => 'commerce_order_reference',
      'settings' => array(
        'referenceable_types' => array(
          'commerce_order' => $t('Order'),
        ),
        'field_injection' => FALSE,
      ),
    ),
    'commerce_recurring_next_due' => array(
      'field_name' => 'commerce_recurring_next_due',
      'cardinality' => 1,
      'type' => 'datestamp',
      'settings' => array(
        'granularity' => array(
          'day' => 'day',
          'hour' => 0,
          'minute' => 0,
          'month' => 'month',
          'second' => 0,
          'year' => 'year',
        ),
        'repeat' => 0,
        'timezone_db' => 'UTC',
        'todate' => '',
        'tz_handling' => 'none',
      ),
    ),
    'commerce_recurring_payment_due' => array(
      'field_name' => 'commerce_recurring_payment_due',
      'cardinality' => 1,
      'type' => 'datestamp',
      'settings' => array(
        'granularity' => array(
          'day' => 'day',
          'hour' => 0,
          'minute' => 0,
          'month' => 'month',
          'second' => 0,
          'year' => 'year',
        ),
        'repeat' => 0,
        'timezone_db' => 'UTC',
        'todate' => '',
        'tz_handling' => 'none',
      ),
    ),
    'commerce_recurring_payment' => array(
      'field_name' => 'commerce_recurring_payment',
      'cardinality' => 1,
      'type' => 'list_boolean',
      'settings' => array(
        'allowed_values' => array(
          0 => $t('Unprocessed'),
          1 => $t('Processed'),
        ),
      ),
    ),
  );
}