Show
Ignore:
Timestamp:
07/31/05 12:41:39 (3 years ago)
Author:
schst
Message:

Pass the element to the datasource, to allow context-sensitive datasources (as requested #151)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/examples/example_datasrc_function.php

    r117 r267  
    6464    * @return   array   $areas          Associative array, keys are values, values are labels 
    6565    */ 
    66     function getAreas( $elementName
     66    function getAreas( $element
    6767    { 
    6868        return  array( 
    6969            array(   
    70                 'label' => 'No '.$elementName
     70                'label' => 'No '.$element->getName()
    7171                'value' =>  '1', 
    7272            ), 
     
    125125    // DISPLAY FORM ------------------------------------------------------ 
    126126    displayForm( $form, $elements ); // see patExampleGen/customFunctions.php 
    127  
    128  
    129      
    130127     
    131128    // EXAMPLE END ------------------------------------------------------