home | career | drupal | java | mac | mysql | perl | php | scala | uml | unix

Drupal example source code file (filter.views.inc)

This example Drupal source code file (filter.views.inc) is included in the DevDaily.com "Drupal Source Code Warehouse" project. The intent of this project is to help you "Learn Drupal by Example".

PHP - Drupal tags/keywords

array, filter_views_data, format, function, left_field, left_table, node, node_revisions, php, return

The filter.views.inc Drupal example source code

<?php
// $Id: filter.views.inc,v 1.1.6.2 2010/07/19 09:18:42 dereine Exp $
/**
 * @file
 * Provide basic views data for filter.module.
 */

/**
 * @defgroup views_filter_module filter.module handlers
 *
 * Only includes the table 'filter_formats'.
 * @{
 */

/**
 * Implements hook_views_data()
 */
function filter_views_data() {
  // ----------------------------------------------------------------------
  // filter_formats table

  // Have not defined $data['filter_formats']['table']['group'] since
  // no fields are defined here yet.
  $data['filter_formats']['table']['join'] = array(
    'node_revisions' => array(
      'left_field' => 'format',
      'field' => 'format',
    ),
    'node' => array(
      'left_table' => 'node_revisions',
      'left_field' => 'format',
      'field' => 'format',
    ),
  );

  return $data;
}

/**
 * @}
 */

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal filter.views.inc source code file:

new blog posts

"Drupal" is a registered trademark of Dries Buytaert.

my drupal tutorials and examples  

Copyright 1998-2016 Alvin Alexander, alvinalexander.com
All Rights Reserved.

Beginning in 2016, a portion of the proceeds from pages under the '/drupal-code-examples/' URI will be donated to charity.