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

Drupal example source code file (list_test.module)

This example Drupal source code file (list_test.module) 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, field, function, group, list_test_allowed_values_callback, one, php, return, script, some, strong, unescaped, values, zero

The list_test.module Drupal example source code

<?php
// $Id: list_test.module,v 1.1 2009/12/14 20:18:55 dries Exp $

/**
 * @file
 * Helper module for the List module tests.
 */

/**
 * Allowed values callback.
 */
function list_test_allowed_values_callback($field) {
  $values = array(
    'Group 1' => array(
      0 => 'Zero',
    ),
    1 => 'One',
    'Group 2' => array(
      2 => 'Some <script>dangerous</script> & unescaped <strong>markup</strong>',
    ),
  );

  return $values;
}

Other Drupal examples (source code examples)

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