You are here

scs_views.module in Simplenews Content Selection 7

Integrate Simplenews Content Selection with views and views bulk operations

File

simplenews_content_selection_views/scs_views.module
View source
<?php

/**
 * @file
 * Integrate Simplenews Content Selection with views and views bulk operations
 */

/**
 * Implementation of hook_action_info().
 */
function scs_views_action_info() {
  return array(
    'scs_views_create_newsletter_action' => array(
      'type' => 'node',
      'label' => 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, $form_state) {
  $form = array();
  $form = _scs_get_metadata_form($form);
  $form += _scs_get_sorting_form($form, $form_state['selection']);
  return $form;
}

/**
 * Get the selected nodes and create a newsletter from it
 */
function scs_views_create_newsletter_action_submit($form, $form_state) {
  _scs_nodes_submit($form_state);
}

Functions

Namesort descending Description
scs_views_action_info Implementation of hook_action_info().
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_create_newsletter_action_submit Get the selected nodes and create a newsletter from it