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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
actions: { | |
save() { | |
console.log('components/add-record-modal action - save!'); | |
this.sendAction('save'); | |
}, | |
actionTest() { |
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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle 101' | |
}); |
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
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
actions:{ | |
save(){ | |
console.log('save in component'); | |
this.sendAction('save'); | |
this.sendAction('savemore'); | |
} | |
} |
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 | |
/* Script located in the docroot for your Drupal 8 site */ | |
use Drupal\Core\DrupalKernel; | |
use Drupal\Core\Site\Settings; | |
use Symfony\Component\HttpFoundation\Request; | |
$autoloader = require_once __DIR__ . '/core/vendor/autoload.php'; | |
use GuzzleHttp\Client; |
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
/* Code to launch a maestro workflow. | |
* Pass in the template ID and security token | |
* Once the workflow instance is launched, it | |
* returns the new process id | |
*/ | |
$template = 1; // Set to the maestro template you want to launch | |
$sec_token = drupal_get_token('maestro_user'); | |
$new_process_id = maestro_launch_workflow($template, $sec_token); |
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
/** | |
* Implement hook_theme() | |
*/ | |
function as_newsletter_template_2014v1_commbuilder_template_info() { | |
return array( | |
'theme_set_2014v1' => array( | |
'default' => array( | |
'email' => array( | |
'description' => 'Single column layout tested for Outlook', | |
'template' => 'theme/email_single_column', |
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
//* | |
Often, in development or debugging, we need to toggle on/off a section of code or want to swap a few lines. | |
We often comment out those lines but here is a neat trick where we have the comment annotation around two | |
sections of code - in my case I want to test some code with a value of 100 or 200 but this could be a tw | |
large sections of code that I want to toggle or swap. | |
Add this to you editor and just delete the first / and watch as your editor disables the first assignment | |
and now enables the 2nd assignment. It's the little things at times that amaze you as I sit here | |
toggling on/off that first / to see my editor's reaction :) |
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
$implementations = array('pi_commerce' => $implementations['pi_commerce']) + $implementations; |
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
// Helper function to instantiate maestro engine and step it forward | |
maestro_orchestrator(); | |
// Alternative method to interact with the maestro engine API | |
$maestro = Maestro::createMaestroObject(1); | |
/* | |
That's it! Wherever you want to run the orchestrator, you will place that code. | |
If you look in maestro.module, you will find the function maestro_orchestrator. | |
Inside of it we are trying to acquire a lock based on a defined lock delay (in seconds) configuration parameter. | |
The lock is essentially a simple lock semaphore. If for some reason the lock is not relinquished in a default of 512 seconds, |
NewerOlder