You are here

views_add_button.views.inc in Views Add Button 7

Same filename and directory in other branches
  1. 8 views_add_button.views.inc
  2. 2.0.x views_add_button.views.inc

Views definitions for 'views_add_button'

File

views_add_button.views.inc
View source
<?php

/**
 * @file
 * Views definitions for 'views_add_button'
 */

/**
 * Implementation of hook_views_handlers() to register all of the basic handlers
 * views uses.
 */
function views_add_button_views_handlers() {
  $handlers = array(
    'info' => array(
      'path' => drupal_get_path('module', 'views_add_button'),
    ),
    'handlers' => array(
      'views_add_button_area' => array(
        'parent' => 'views_handler_area',
      ),
    ),
  );
  return $handlers;
}

/**
 * Implements hook_views_data().
 *
 * The first key in the data array is the entity type, e.g. node ot taxonomy_term, with "views" being global.
 *
 * Also, after title and help, the 'field' key creates a field to be used in rows, whereas the 'area' key is used for
 * the header and footer.
 */
function views_add_button_views_data() {
  $data = array();
  $data['views']['views_add_button_area'] = array(
    'title' => t('Node Add Button'),
    'help' => t('Render an add button for a selected content type, and add parameters'),
    'area' => array(
      'handler' => 'views_add_button_area',
    ),
  );
  return $data;
}

Functions

Namesort descending Description
views_add_button_views_data Implements hook_views_data().
views_add_button_views_handlers Implementation of hook_views_handlers() to register all of the basic handlers views uses.