You are here

function _fe_nodequeue_save_queue in Features Extra 6

Same name and namespace in other branches
  1. 7 fe_nodequeue/fe_nodequeue.module \_fe_nodequeue_save_queue()

Save a nodequeue queue.

Parameters

$settings:

Return value

array

2 calls to _fe_nodequeue_save_queue()
fe_nodequeue_queue_features_rebuild in ./fe_nodequeue.module
Implementation of hook_features_rebuild().
fe_nodequeue_queue_features_revert in ./fe_nodequeue.module
Implementation of hook_features_revert().

File

./fe_nodequeue.module, line 279

Code

function _fe_nodequeue_save_queue($settings = array()) {

  // Simulate checkboxes.
  $settings['roles'] = drupal_map_assoc($settings['roles']);
  $settings['types'] = drupal_map_assoc($settings['types']);

  // Simulate submitting.
  $form_state = array();
  $form_state['values'] = $settings;
  module_load_include('inc', 'nodequeue', 'includes/nodequeue.admin');
  nodequeue_edit_queue_form_submit(NULL, $form_state);
  $settings['qid'] = $form_state['values']['qid'];
  return $settings;
}