You are here

static function CommerceLicenseRemoteBase::fields in Commerce License 7

Implements EntityBundlePluginProvideFieldsInterface::fields().

Overrides CommerceLicenseBase::fields

1 call to CommerceLicenseRemoteBase::fields()
CommerceLicenseRemoteExample::fields in modules/commerce_license_example/plugins/license_type/CommerceLicenseRemoteExample.class.php
Implements EntityBundlePluginProvideFieldsInterface::fields().
1 method overrides CommerceLicenseRemoteBase::fields()
CommerceLicenseRemoteExample::fields in modules/commerce_license_example/plugins/license_type/CommerceLicenseRemoteExample.class.php
Implements EntityBundlePluginProvideFieldsInterface::fields().

File

includes/plugins/license_type/base.inc, line 405
Abstract and interface plugin implementation.

Class

CommerceLicenseRemoteBase
Remote license base class.

Code

static function fields() {
  $fields = parent::fields();
  $fields['sync_status']['field'] = array(
    'type' => 'list_integer',
    'cardinality' => 1,
    'settings' => array(
      'allowed_values' => array(
        0 => t('N/A'),
        COMMERCE_LICENSE_NEEDS_SYNC => t('Needs synchronization'),
        COMMERCE_LICENSE_SYNCED => t('Synchronized'),
        COMMERCE_LICENSE_SYNC_FAILED => t('Synchronization failed'),
      ),
    ),
  );
  $fields['sync_status']['instance'] = array(
    'label' => t('Synchronization status'),
    'required' => TRUE,
    'widget' => array(
      'type' => 'options_select',
    ),
  );
  return $fields;
}