Skip to content

Instantly share code, notes, and snippets.

@kporras07
Last active November 6, 2015 01:41
Show Gist options
  • Save kporras07/22c2487ccee52648c8bb to your computer and use it in GitHub Desktop.
Save kporras07/22c2487ccee52648c8bb to your computer and use it in GitHub Desktop.
Create Nodequeue
/**
* Helper function that creates the default nodequeues.
*/
function demo_create_default_nodequeues() {
$queue = nodequeue_load_queue_by_name('nodequeue_name');
if (!$queue) {
$nodequeue = new stdClass();
$nodequeue->name = 'nodequeue_name';
$nodequeue->title = 'My Nodequeue';
$nodequeue->subqueue_title = '';
$nodequeue->size = 3;
$nodequeue->link = '';
$nodequeue->link_remove = '';
$nodequeue->owner = 'nodequeue';
$nodequeue->show_in_links = 0;
$nodequeue->show_in_tab = 1;
$nodequeue->show_in_ui = 1;
$nodequeue->i18n = 0;
$nodequeue->reverse = 0;
$nodequeue->reference = 0;
$nodequeue->insert_at_front = TRUE;
$nodequeue->subqueues = 1;
$nodequeue->roles = array();
$nodequeue->types = array('event');
$nodequeue->add_subqueue = array('My Nodequeue');
nodequeue_save($nodequeue);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment