<?php

/**
 * @file
 * Interface between nodeaccess_password.module and views.module.
 */

/**
 * Implements hook_views_plugins().
 *
 * Defines some plugins used by the Views modes for
 * nodeaccess_password.
 */
function nodeaccess_password_views_plugins() {
  $plugins = array(
    'module' => 'nodeaccess_password', // This just tells our themes are elsewhere.
    'display' => array(
      'nodeaccess_password_views_plugin_display' => array(
        'path' => drupal_get_path('module', 'nodeaccess_password'),
        'title' => 'Node access password',
        'help' => 'Destination-agnostic display. Mostly useful for programmatic views.',
        'handler' => 'nodeaccess_password_views_plugin_display',
        'no ui' => TRUE, // Programmatic use only.
        'uses hook menu' => FALSE,
        'use ajax' => FALSE,
        'use pager' => FALSE,
        'accept attachments' => FALSE,
      ),
    ),
    'style' => array(
      'nodeaccess_password_views_plugin_style' => array(
        'path' => drupal_get_path('module', 'nodeaccess_password'),
        'title' => 'Results array of entity ids',
        'help' => 'Returns the view as a PHP array of entity ids.',
        'handler' => 'nodeaccess_password_views_plugin_style',
        'no ui' => TRUE, // Programmatic use only.
        'uses row plugin' => TRUE,
        'uses fields' => TRUE,
        'type' => 'normal',
        'even empty' => TRUE,
      ),
    ),
  );
  return $plugins;
}