Changeset 42 for trunk/Base/Types/Enumeration.php
- Timestamp:
- Nov 24, 2009, 9:13:38 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Base/Types/Enumeration.php
r40 r42 1 1 <?php 2 3 include_once(dirname(__FILE__).'/Base.php'); 2 4 3 5 class TypeEnumeration extends TypeBase … … 5 7 function OnView($Item) 6 8 { 7 $Type = GetTypeDefinition($Item['Type']); 8 $Output = $Type['Parameters'][$Item['Value']]; 9 $Type = $this->System->Type->GetTypeDefinition($Item['Type']); 10 if(array_key_exists($Item['Value'], $Type['Parameters'])) 11 $Output = $Type['Parameters'][$Item['Value']]; 12 else $Output = $Item['Value']; 9 13 return($Output); 10 14 } … … 12 16 function OnEdit($Item) 13 17 { 14 $Type = GetTypeDefinition($Item['Type']);18 $Type = $this->System->Type->GetTypeDefinition($Item['Type']); 15 19 $Output = '<select name="'.$Item['Name'].'">'; 16 20 foreach($Type['Parameters'] as $Index => $StateName)
Note:
See TracChangeset
for help on using the changeset viewer.