scs_views.module in Simplenews Content Selection 6.2
Integrate Simplenews Content Selection with views and views bulk operations
File
simplenews_content_selection_views/scs_views.moduleView source
<?php
/**
* @file
* Integrate Simplenews Content Selection with views and views bulk operations
*/
/**
* Implementation of hook_menu().
*/
function scs_views_menu() {
$items = array();
$items['admin/content/scs_node_selection/views'] = array(
'title' => t('From views'),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'scs_views_selection_form',
),
'access arguments' => array(
'create newsletter from views',
),
'file' => 'scs_views.pages.inc',
'type' => MENU_LOCAL_TASK,
);
return $items;
}
/**
* Implementation of hook_action_info().
*/
function scs_views_action_info() {
return array(
'scs_views_create_newsletter_action' => array(
'type' => 'node',
'description' => t('Create newsletter'),
'configurable' => TRUE,
'behavior' => array(
'scs_views_create_newsletter',
),
),
);
}
/**
* Configuration form for tis action. Not used as form, but used as a step to go to the node sorter.
*/
function scs_views_create_newsletter_action_form($context) {
$nodes = array();
$counter = 0;
foreach ($context['selection'] as $node) {
$nodes['node_' . $counter] = $node->nid;
$counter++;
}
$query = http_build_query($nodes, '', '&');
drupal_goto('admin/content/scs_sort_nodes', $query);
//Done this to make sure VBO is still working.
$form = array();
return $form;
}
/**
* Get the selected nodes and create a newsletter from it
*/
function scs_views_create_newsletter_action($object, $context) {
}
Functions
Name![]() |
Description |
---|---|
scs_views_action_info | Implementation of hook_action_info(). |
scs_views_create_newsletter_action | Get the selected nodes and create a newsletter from it |
scs_views_create_newsletter_action_form | Configuration form for tis action. Not used as form, but used as a step to go to the node sorter. |
scs_views_menu | Implementation of hook_menu(). |