I'm trying to get this to work with the Salesforce Mappings module.

It generates URLs for every mapped entity to provide a UI for checking an entities pushes and pulls to salesforce.

It assumes each entity has a load function: ENTITY_load(), like node_load(), user_load() etc.

This is pretty much a standard practice around drupal. Problem is, there is no webform_submission_entity_load() function.

So after looking into it, I noticed you weren't too happy with the name of the load function you had:

/**
 *
 * Note this function could not be called webform_entity_webform_submission_load()
 * because that would be a namespace colision.  Can't wait for PHP 5.3 to be
 * everywhere.
 *
 * @param $sid
 *   The sid of a sigle webform submission entity to load.
 */
function webform_entity_load_webform_submission($sid) {

So I propose changing that to webform_submission_entity_load() to maintain consistency with Drupal's other entities.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jon Pugh’s picture

Jon Pugh’s picture

FileSize
2.23 KB

rerolling

AaronBauman’s picture

Status: Needs review » Reviewed & tested by the community

Patch #2 works as advertised.

You will probably also want to implement salesforce_mapping_entity_uris_alter() per #2382791: Change function webform_entity_load_webform_submission($sid) to webform_submission_entity_load($sid):

function ecample_salesforce_mapping_entity_uris_alter(&$entity_uris) {
  $entity_uris['webform_submission_entity'] = array(
    'path' => 'node/%/submission/',
  );
}

  • Jon Pugh authored 6ce7e20 on 7.x-1.x
    Issue #2382791 by Jon Pugh: Change function...
AaronBauman’s picture

Status: Reviewed & tested by the community » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.