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

Drupal example source code file (node_access_example.install)

This example Drupal source code file (node_access_example.install) 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, default, fields, function, int, key, node_access_example, not, null, php, private, table, true, unsigned

The node_access_example.install Drupal example source code

<?php

/**
 * @file
 * Node access example module's install and uninstall code.
 */

/**
 * Implementation of hook_install().
 */
function node_access_example_install() {
  drupal_install_schema('node_access_example');
}

/**
 * Implementation of hook_uninstall().
 */
function node_access_example_uninstall() {
  drupal_uninstall_schema('node_access_example');
}

/**
 * Implementation of hook_schema().
 */
function node_access_example_schema() {
  $schema['node_access_example'] = array(
    'description' => 'Example table for node_access_example module',
    'fields' => array(
      'nid'     => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0),
      'private' => array('type' => 'int', 'not null' => TRUE, 'default' => 0),
    ),
    'primary key' => array('nid'),
  );

  return $schema;
}

Other Drupal examples (source code examples)

Here is a short list of links related to this Drupal node_access_example.install 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.