Heine

  • home
  • drupal
  • about
Home

Example scaffolding

You can use the following code to create an example.module which you can use to experiment with the examples in this guide.

// example.module
function example_menu($maycache) {
  if ($maycache) {
    $items[] = array(
      'path' => 'scratch/elements',
      'access' => user_access('administer site configuration'),
      'type' => MENU_NORMAL_ITEM,
      'title' => t('Elements'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array('example_elements_form'),
    );
    return $items;
  }
}

; example.info
name = "Example"
description = "Quick scratch module."

Average: 5 (3 votes)
‹ Elements up Comboselect element ›
  • Printer-friendly version

Recent posts

  • In doubt? Read the specs!
  • About the Webform SA
  • Psalmen voor Altblokfluit
  • Unserializing user-supplied data, a bad idea
  • Planet Drupal past and current
more

Security reviews

  • Afraid custom code makes your site vulnerable?
  • You don't really trust that module you just downloaded from Drupal.org?

Sleep better after a security review.

Tags

bladmuziek blood donation blood supply CSRF Drupal Input Format modx MSM Performance Planet Drupal Security Varnish
more tags
  • home
  • drupal
  • about

Copyright © 2011 by Heine Deelstra. All rights reserved.