Subscriptions by Reference

Categories

Component ID

1990654

Component name

Subscriptions by Reference

Component type

module

Maintenance status

Development status

Component security advisory coverage

covered

Downloads

586

Component created

Component changed

Component body

This module will allow users to subscribe to new content based on reference fields (see http://drupal.org/node/286789).

Module supports both node references and entity references fields on nodes.

Currently this module can be used by developers by adding a hook to their module, which will define the fields that will be available to users for subscription:

/**
 * Implements hook_subscriptions_reference_info()
 */
function mymodule_subscriptions_reference_info() {
  return array(
    'question_answers' => array(
      'parent' => 'question',
      'child' => 'answer',
      'field' => 'field_answers_question',
      'ref_item' => 'nid', // this will be 'target_id' for entity reference
  ));
}

This hook will allow users to receive notifications about new answers created for questions they are subscribed to.

Requirements
This project extends Subscriptions.

Please check #2035667: Error when creating a child node to a parent which is subscribed to after installation, patch from #1853644: subscriptions_get generates pdo exception is required for this module to work.