Changeset 93 for trunk/www/Base/Form.php


Ignore:
Timestamp:
Aug 15, 2013, 11:17:26 PM (11 years ago)
Author:
chronos
Message:
  • Fixed: System variable as parameter to constructors of descendents of Module class.
  • Removed: End PHP mark "?>" from all files.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/Base/Form.php

    r78 r93  
    1313  function __construct($System, $FormClass)
    1414  { 
     15        parent::__construct($System);
    1516    $this->Definition = $FormClass;
    1617    foreach($this->Definition['Items'] as $Index => $Item)
     
    1819      $this->Values[$Index] = '';
    1920    }   
    20     $this->System = $System;
    21     $this->Database = $System->Database;
    22     $this->Config = $System->Config;
    2321  }
    2422
     
    4341      {
    4442        if(!array_key_exists($Index, $this->Values) and isset($Item['Default'])) $this->Values[$Index] = $Item['Default'];
    45         $Edit = ExecuteTypeEvent($Item['Type'], 'OnView',
     43        $Edit = ExecuteTypeEvent($this->System, $Item['Type'], 'OnView',
    4644          array('Name' => $Index, 'Value' => $this->Values[$Index], 'Type' => $Item['Type']));
    4745        array_push($Table['Rows'], array($Item['Caption'], $Edit));
     
    7472      {
    7573        if(!array_key_exists($Index, $this->Values) and isset($Item['Default'])) $this->Values[$Index] = $Item['Default'];
    76         $Edit = ExecuteTypeEvent($Item['Type'], 'OnEdit', array('Name' => $Index, 'Value' => $this->Values[$Index], 'Type' => $Item['Type']));
     74        $Edit = ExecuteTypeEvent($this->System, $Item['Type'], 'OnEdit', array('Name' => $Index, 'Value' => $this->Values[$Index], 'Type' => $Item['Type']));
    7775        array_push($Table['Rows'], array($Item['Caption'].':', $Edit));
    7876      }
     
    8280    '</fieldset>';
    8381    foreach($this->Definition['Items'] as $Index => $Item)
    84       if($Item['Type'] == 'Hidden') $Output .= ExecuteTypeEvent($Item['Type'], 'OnEdit', array('Name' => $Index, 'Value' => $this->Values[$Index], 'Type' => $Item['Type']));
     82      if($Item['Type'] == 'Hidden') $Output .= ExecuteTypeEvent($this->System, $Item['Type'], 'OnEdit', array('Name' => $Index, 'Value' => $this->Values[$Index], 'Type' => $Item['Type']));
    8583    return($Output);
    8684  }
     
    123121    {
    124122      if(array_key_exists($Context.$Index, $_POST))
    125       $Values[$Index] = ExecuteTypeEvent($Item['Type'], 'OnLoad',
     123      $Values[$Index] = ExecuteTypeEvent($this->System, $Item['Type'], 'OnLoad',
    126124        array('Name' => $Index, 'Type' => $Item['Type']));
    127125    }
     
    129127  }
    130128}
    131 
    132 ?>
Note: See TracChangeset for help on using the changeset viewer.