Changeset 687 for trunk/Common/Form/Form.php
- Timestamp:
- Sep 7, 2014, 12:28:06 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/Form/Form.php
r647 r687 42 42 } 43 43 44 function GetValue($Index, $Event = 'OnView') 45 { 46 $Item = $this->Definition['Items'][$Index]; 47 if(array_key_exists($Item['Type'], $this->FormManager->FormTypes)) 48 { 49 if(!array_key_exists($Item['Type'], $this->FormManager->Type->TypeDefinitionList)) 50 $this->FormManager->Type->RegisterType($Item['Type'], '', $this->FormManager->FormTypes[$Item['Type']]); 51 if($this->FormManager->FormTypes[$Item['Type']]['Type'] == 'Reference') 52 $UseType = 'OneToMany'; 53 else if($this->FormManager->FormTypes[$Item['Type']]['Type'] == 'Enumeration') 54 $UseType = 'Enumeration'; 55 } else $UseType = $Item['Type']; 56 return $this->FormManager->Type->ExecuteTypeEvent($UseType, $Event, 57 array('Value' => $this->Values[$Index], 'Name' => $Index, 58 'Type' => $Item['Type'], 'Values' => $this->Values, 59 'Filter' => $this->Values[$Index])); 60 } 61 44 62 function ShowViewForm() 45 63 { … … 53 71 ($this->FormManager->FormTypes[$Item['Type']]['Type'] != 'ManyToOne'))) 54 72 { 55 56 57 58 59 60 61 62 63 73 if(array_key_exists($Item['Type'], $this->FormManager->FormTypes)) 74 { 75 if(!array_key_exists($Item['Type'], $this->FormManager->Type->TypeDefinitionList)) 76 $this->FormManager->Type->RegisterType($Item['Type'], '', $this->FormManager->FormTypes[$Item['Type']]); 77 if($this->FormManager->FormTypes[$Item['Type']]['Type'] == 'Reference') 78 $UseType = 'OneToMany'; 79 else if($this->FormManager->FormTypes[$Item['Type']]['Type'] == 'Enumeration') 80 $UseType = 'Enumeration'; 81 } else $UseType = $Item['Type']; 64 82 $Edit = $this->FormManager->Type->ExecuteTypeEvent($UseType, 'OnView', 65 83 array('Value' => $this->Values[$Index], 'Name' => $Index,
Note:
See TracChangeset
for help on using the changeset viewer.