Ignore:
Timestamp:
Sep 7, 2014, 12:28:06 PM (10 years ago)
Author:
chronos
Message:
  • Upraveno: Vylepšení čitelnosti záznamu změn v IS do tabulky Log.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Common/Form/Form.php

    r647 r687  
    4242  }
    4343
     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
    4462  function ShowViewForm()
    4563  {
     
    5371    ($this->FormManager->FormTypes[$Item['Type']]['Type'] != 'ManyToOne')))
    5472    {
    55         if(array_key_exists($Item['Type'], $this->FormManager->FormTypes))
    56         {
    57           if(!array_key_exists($Item['Type'], $this->FormManager->Type->TypeDefinitionList))
    58             $this->FormManager->Type->RegisterType($Item['Type'], '', $this->FormManager->FormTypes[$Item['Type']]);
    59           if($this->FormManager->FormTypes[$Item['Type']]['Type'] == 'Reference')
    60             $UseType = 'OneToMany';
    61           else if($this->FormManager->FormTypes[$Item['Type']]['Type'] == 'Enumeration')
    62             $UseType = 'Enumeration';
    63         } else $UseType = $Item['Type'];
     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'];
    6482      $Edit = $this->FormManager->Type->ExecuteTypeEvent($UseType, 'OnView',
    6583        array('Value' => $this->Values[$Index], 'Name' => $Index,
Note: See TracChangeset for help on using the changeset viewer.