Skip to content

Instantly share code, notes, and snippets.

View dimitridarras's full-sized avatar

Dimitri Darras dimitridarras

View GitHub Profile
@dimitridarras
dimitridarras / batch_example.php
Created April 21, 2018 02:26
Setting up a Drupal 7 Batch for Callbacks
//menu callback function - sets up the batch
function batch_dom_parse_to_node($all_raw_hyperlinks,$progress,$ceiling) {
$batch = array(
'operations' => array(),
'finished' => 'dom_parse_to_node_batch_finished', // runs after batch is finished
'title' => t('Processing Import'),
'init_message' => t('Import is starting.'),
'progress_message' => t('Processed @current out of @total.'),
'error_message' => t('Import has encountered an error.'),
);
@dimitridarras
dimitridarras / gist:e1d4b53c0d862d5608a4
Created April 30, 2015 19:33
Redirect User on Login in Drupal using JQuery Cookies
coming soon