You are here

function _commerce_recurring_installed_instances in Commerce Recurring Framework 7

Returns a structured array defining the instances for this module

Return value

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

2 calls to _commerce_recurring_installed_instances()
commerce_recurring_install in ./commerce_recurring.install
Implements hook_install().
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 166

Code

function _commerce_recurring_installed_instances() {
  $t = get_t();
  return array(
    'commerce_recurring_interval' => array(
      'entity_type' => 'commerce_product',
      'bundle' => 'recurring',
      'field_name' => 'commerce_recurring_interval',
      'label' => $t('Billing interval'),
      'widget' => array(
        'type' => 'interval_default',
      ),
      'display' => array(
        'default' => array(
          'label' => 'hidden',
          'type' => 'interval_default',
        ),
      ),
      'settings' => array(
        'allowed_periods' => array(
          'day' => 'day',
          'week' => 'week',
          'month' => 'month',
        ),
      ),
    ),
    'commerce_recurring_payment' => array(
      'entity_type' => 'commerce_order',
      'bundle' => 'recurring_order',
      'field_name' => 'commerce_recurring_payment',
      'label' => $t('Payment Processed'),
      'widget' => array(
        'type' => 'options_select',
      ),
      'display' => array(
        'default' => array(
          'label' => 'hidden',
          'type' => 'list_default',
        ),
      ),
    ),
    'commerce_recurring_parent_order' => array(
      'entity_type' => 'commerce_order',
      'bundle' => 'recurring_order',
      'field_name' => 'commerce_recurring_parent_order',
      'label' => $t('Parent Order.'),
      'widget' => array(
        'type' => 'options_select',
      ),
      'display' => array(
        'default' => array(
          'label' => 'hidden',
          'type' => 'commerce_order_reference_link',
        ),
      ),
    ),
    'commerce_recurring_payment_due' => array(
      'entity_type' => 'commerce_order',
      'bundle' => 'recurring_order',
      'field_name' => 'commerce_recurring_payment_due',
      'label' => $t('Payment Due.'),
      'widget' => array(
        'settings' => array(
          'increment' => '15',
          'input_format' => 'm/d/Y',
          'default_value' => 'blank',
          'input_format_custom' => '',
          'label_position' => 'above',
          'repeat_collapsed' => 0,
          'text_parts' => array(),
          'year_range' => '-3:+3',
        ),
        'type' => 'date_popup',
      ),
      'display' => array(
        'default' => array(
          'label' => 'above',
          'module' => 'date',
          'settings' => array(
            'format_type' => 'long',
            'fromto' => 'both',
            'multiple_from' => '',
            'multiple_number' => '',
            'multiple_to' => '',
            'show_repeat_rule' => 'show',
          ),
          'type' => 'date_default',
        ),
      ),
    ),
    'commerce_recurring_next_due' => array(
      'entity_type' => 'commerce_order',
      'bundle' => 'commerce_order',
      'field_name' => 'commerce_recurring_next_due',
      'label' => $t('Next Invoice.'),
      'widget' => array(
        'settings' => array(
          'increment' => '15',
          'default_value' => 'blank',
          'input_format' => 'm/d/Y',
          'input_format_custom' => '',
          'label_position' => 'above',
          'repeat_collapsed' => 0,
          'text_parts' => array(),
          'year_range' => '-3:+3',
        ),
        'type' => 'date_popup',
      ),
      'display' => array(
        'default' => array(
          'label' => 'above',
          'module' => 'date',
          'settings' => array(
            'format_type' => 'long',
            'fromto' => 'both',
            'multiple_from' => '',
            'multiple_number' => '',
            'multiple_to' => '',
            'show_repeat_rule' => 'show',
          ),
          'type' => 'date_default',
        ),
      ),
    ),
  );
}