Heine

  • Home
  • Drupal
  • About
Home » Guides » Elements

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."
‹ Elements up Comboselect element ›
  • Printer-friendly version

Recent posts

  • Teampassword manager's password generator is biased
  • Other vectors for SA-CORE-2014-005?
  • Lazy loading: hook_hook_info is for hook owners only.
  • "Always offline" problem in EA's Origin due to antivirus
  • From bug to exploit - Bakery SSO
more

Security reviews

I provide security reviews of custom code, contributed modules, themes and entire sites via LimoenGroen.

Contact us for a quote.

Follow @ustima

Copyright © 2021 by Heine Deelstra. All rights reserved.

  • Home
  • Drupal
  • About