Views Schema

kkaefer - March 30, 2009 - 20:43

Note: It's probably safer to use the Table Wizard module

Auto-generates table descriptions for Views based on actual database tables. Requires schema.module for gathering information about the table. Basic usage:

<?php
function hook_views_schema() {
  return array(
   
'foo' => array('base' => TRUE),
   
'bar' => array('base' => FALSE, 'title' => 'Bars'),
  );
}
?>

You can augment and alter the auto-generated information by implementing hook_views_data_alter(). This is also the place where you can add join definitions, relationships and modify the handlers.

Note: This module does not (yet?) have a UI. It is an API-only module for use by other developers.

Development sponsored by NowPublic.

Downloads

Version Downloads Date Links
6.x-1.x-dev Download (6.98 KB) 2009-Apr-02 Notes


 
 

Drupal is a registered trademark of Dries Buytaert.