Skip to content

Instantly share code, notes, and snippets.

View adguernier's full-sized avatar

adri1 adguernier

  • Marmelab
  • France
View GitHub Profile
@adguernier
adguernier / MyLogicClass.php
Last active August 4, 2016 13:01
cron module for Drupal with queue
<?php
namespace Drupal\cron_module_cron\Namespace;
public $myData = [
'title' => 'Toto',
'body' => 'blablabla',
'other_field_name' => '...'
];
@adguernier
adguernier / callback.js
Created May 3, 2016 16:05
callback function for jQuery module
var callBack = function(func){
if (typeof plugin.settings[func] === 'function' && plugin.settings[func] !== '') {
return plugin.settings[func]();
}
else{
throw new Error('callback not a function');
}
};
callBack('onSomething');