You are here

class SalesforceMappingObjectMetadataController in Salesforce Suite 7.3

Hierarchy

Expanded class hierarchy of SalesforceMappingObjectMetadataController

See also

hook_entity_property_info()

1 string reference to 'SalesforceMappingObjectMetadataController'
salesforce_mapping_entity_info in modules/salesforce_mapping/salesforce_mapping.module
Implements hook_entity_info().

File

modules/salesforce_mapping/includes/salesforce_mapping_object.metadata.inc, line 6

View source
class SalesforceMappingObjectMetadataController extends EntityDefaultMetadataController {

  /**
   * Define entity metadata for SalesforceMappingObject.
   */
  public function entityPropertyInfo() {
    $info = parent::entityPropertyInfo();
    $properties =& $info[$this->type]['properties'];
    $properties['revision_id'] = array_merge($properties['revision_id'], array(
      'label' => t('Revision Id'),
    ));
    $properties['salesforce_id'] = array_merge($properties['salesforce_id'], array(
      'label' => t('Salesforce Id'),
    ));
    $properties['entity_id'] = array_merge($properties['entity_id'], array(
      'label' => t('Entity Id'),
    ));
    $properties['entity_type'] = array_merge($properties['entity_type'], array(
      'label' => t('Entity type'),
    ));
    $properties['created'] = array_merge($properties['created'], array(
      'label' => t('Created'),
      'type' => 'date',
    ));
    $properties['entity_updated'] = array_merge($properties['entity_updated'], array(
      'label' => t('Entity updated'),
      'type' => 'date',
    ));
    $properties['last_sync'] = array_merge($properties['last_sync'], array(
      'label' => t('Last sync'),
      'type' => 'date',
    ));
    $properties['last_sync_action'] = array_merge($properties['last_sync_action'], array(
      'label' => t('Last sync action'),
    ));
    $properties['last_sync_status'] = array_merge($properties['last_sync_status'], array(
      'label' => t('Last sync status'),
    ));
    $properties['last_sync_message'] = array_merge($properties['last_sync_message'], array(
      'label' => t('Last sync message'),
    ));

    // URL for the Salesforce object.
    $properties['salesforce_url'] = array(
      'label' => t('Salesforce object URL'),
      'description' => t('URL for the Salesforce object'),
      'type' => 'uri',
      'getter callback' => 'salesforce_mapping_object_property_salesforce_url_get',
      'computed' => TRUE,
    );

    // Drupal entity.
    $properties['entity'] = array(
      'label' => t("Entity"),
      'type' => 'entity',
      'schema field' => 'entity',
      'description' => t("The Drupal entity."),
      'getter callback' => 'salesforce_mapping_object_property_entity_get',
      'setter callback' => 'salesforce_mapping_object_property_entity_set',
    );
    return $info;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityDefaultMetadataController::$type protected property
EntityDefaultMetadataController::bundleOptionsList public static function A options list callback returning all bundles for an entity type.
EntityDefaultMetadataController::convertSchema protected function Return a set of properties for an entity based on the schema definition
EntityDefaultMetadataController::__construct public function
SalesforceMappingObjectMetadataController::entityPropertyInfo public function Define entity metadata for SalesforceMappingObject. Overrides EntityDefaultMetadataController::entityPropertyInfo