<?php

/**
 * @file
 * Relation feeds integration module.
 */

 /**
 * Implements hook_ctools_plugin_api().
 */
function scratchpads_relation_feeds_ctools_plugin_api($owner, $api) {
  if ($owner == 'feeds' && $api == 'plugins') {
    return array('version' => 1);
  }
}

/**
 * Implements hook_ctools_plugin_type().
 */
function scratchpads_relation_feeds_ctools_plugin_type() {
  return array(
    'plugins' => array(
      'cache' => TRUE,
      'use hooks' => TRUE,
      'classes' => array('handler'),
    ),
  );
}

/**
 * Implements hook_feeds_plugins().
 */
function scratchpads_relation_feeds_feeds_plugins() {
  $info['ScratchpadsRelationFeedsProcessor'] = array(
    'name' => t('Relation processor'),
    'description' => t('Add and update relations.'),
    'help' => t('Create and update relations from parsed content.'),
    'handler' => array(
      'parent' => 'FeedsProcessor',
      'class' => 'ScratchpadsRelationFeedsProcessor',
      'file' => 'ScratchpadsRelationFeedsProcessor.inc',
      'path' => drupal_get_path('module', 'scratchpads_relation_feeds'),
    ),
  );
  return $info;
}
