This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$I = new ApiTester($scenario); | |
$I->wantTo('Verify message extraction and preparation tasks.'); | |
$I->haveEnabledFilters(); | |
// Get an access token to use in subsequent requests | |
$I->getAccessToken($I); | |
$responseData = json_decode($I->grabResponse()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sba_message_action_node_load($nodes, $types) { | |
// If no message_action nodes are loaded no need to continue. | |
if (!in_array('sba_message_action', $types)) { | |
return; | |
} | |
// Add full messages to each node so we can utilize them later. | |
foreach ($nodes as $nid => $node) { | |
if ($node->type == 'sba_message_action') { | |
$messages = entity_load('sba_message', $node->message_ids); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data":{ | |
"alert_id":"Advocacy-My-Test-Ac-552d6b6a928fe", | |
"account_id":"208", | |
"test_mode":false, | |
"contact":{ | |
"first_name":"Don", | |
"last_name":"Johnson", | |
"address":"104 Briarburn Lane", | |
"address_line_2":"", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"keys": [ | |
"details[page_num]", | |
"details[page_count]", | |
"details[finished]", | |
"op", | |
"form_build_id", | |
"form_id", | |
"form_token", | |
"submitted[sbp_salutation]", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trigger ActionsTakenTriggerHandler on jrsbd__sb_Actions_Taken__c (after insert) { | |
Map<Id, Integer> actionsTaken = new Map<Id, Integer>(); | |
Map<Id, Integer> petitionsSigned = new Map<Id, Integer>(); | |
Map<Id, Integer> actionsLast30Days = new Map<Id, Integer>(); | |
// Figure out how many actions taken and petitions signatures are going to be added to each Contact. | |
for (jrsbd__sb_Actions_Taken__c actionTaken: Trigger.new) { | |
if (actionTaken.jrsbd__Action_Type__c == 'Petition') { | |
if (petitionsSigned.containsKey(actionTaken.jrsbd__Contact__c)) { | |
petitionsSigned.put(actionTaken.jrsbd__Contact__c, petitionsSigned.get(actionTaken.jrsbd__Contact__c) + 1); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* There is a coding mistake in the code below. See if you can spot it and explain why the mistake | |
* may or may not cause an issue when executed. | |
*/ | |
if (!empty($form['#node']->custom_fail_message && $node->webform['redirect_url'] != '<confirmation>')) { | |
drupal_get_messages('status'); | |
drupal_set_message(check_markup($form['#node']->custom_fail_message, 'full_html', '', TRUE)); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add new alter hook in _salesforce_mapping_get_entity_fields | |
// Give other modules a chance to alter the entity fields available for mapping. | |
drupal_alter('salesforce_mapping_entity_fields', $entity_fields, $entity_type, $entity_bundle_type); | |
/** | |
* Implements hook_salesforce_mapping_entity_fields_alter(). | |
*/ | |
function salesforce_line_item_salesforce_mapping_entity_fields_alter(&$entity_fields, $entity_type, $entity_bundle_type) { | |
if ($entity_type == 'commerce_line_item' && $entity_bundle_type == 'designation') { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_springboard_quick_donate_optin_create(). | |
*/ | |
function salesforce_quick_donate_springboard_quick_donate_optin_create($account, $donation, $card_id) { | |
// Load the full card on file entity. | |
$card_on_file = commerce_cardonfile_load($card_id); | |
// Create a quick donate subscription object and queue it up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!--[if IE 8]><html class="ie8" lang="en"> <![endif]--> | |
<!--[if IE 9]><html class="ie9" lang="en"> <![endif]--> | |
<!--[if gte IE 9]><html class="ie" lang="en"> <![endif]--> | |
<head profile="http://www.w3.org/1999/xhtml/vocab"> | |
<meta name="HandheldFriendly" content="TRUE" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" /> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script type="text/javascript">window.NREUM||(NREUM={}),__nr_require=function(e,n,t){function r(t){if(!n[t]){var o=n[t]={exports:{}};e[t][0].call(o.exports,function(n){var o=e[t][1][n];return r(o||n)},o,o.exports)}return n[t].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<t.length;o++)r(t[o]);return r}({1:[function(e,n,t){function r(){}function o(e,n,t){return function(){return i(e,[c.now()].concat(u(arguments)),n?null:this,t),n?void 0:this}}var i=e("handle"),a=e(2),u=e(3),f=e("ee").get("tracer"),c=e("loader"),s=NREUM;"undefined |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<!--[if IE 8]><html class="ie8" lang="en"> <![endif]--> | |
<!--[if IE 9]><html class="ie9" lang="en"> <![endif]--> | |
<!--[if gte IE 9]><html class="ie" lang="en"> <![endif]--> | |
<head profile="http://www.w3.org/1999/xhtml/vocab"> | |
<meta name="HandheldFriendly" content="TRUE" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1" /> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script type="text/javascript">window.NREUM||(NREUM={}),__nr_require=function(e,n,t){function r(t){if(!n[t]){var o=n[t]={exports:{}};e[t][0].call(o.exports,function(n){var o=e[t][1][n];return r(o||n)},o,o.exports)}return n[t].exports}if("function"==typeof __nr_require)return __nr_require;for(var o=0;o<t.length;o++)r(t[o]);return r}({1:[function(e,n,t){function r(){}function o(e,n,t){return function(){return i(e,[c.now()].concat(u(arguments)),n?null:this,t),n?void 0:this}}var i=e("handle"),a=e(2),u=e(3),f=e("ee").get("tracer"),c=e("loader"),s=NREUM;"undefined |