Ignore:
Timestamp:
Mar 16, 2016, 8:51:59 PM (9 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Network/Network.php

    r815 r817  
    171171        'API' => array('Type' => 'TDeviceAPIType', 'Caption' => 'API', 'Default' => '', 'Null' => true),
    172172      ),
     173      'AfterInsert' => array($this, 'AfterInsertNetworkDevice'),
     174      'AfterModify' => array($this, 'AfterModifyNetworkDevice'),
     175      'AfterDelete' => array($this, 'AfterModifyNetworkDevice'),
    173176    ));
    174177    $this->System->FormManager->RegisterClass('NetworkDeviceType', array(
     
    201204        'Ports' => array('Type' => 'TDevicePortListInterface', 'Caption' => 'Síťové porty', 'Default' => ''),
    202205      ),
     206      'AfterInsert' => array($this, 'AfterInsertNetworkInterface'),
     207      'AfterModify' => array($this, 'AfterModifyNetworkInterface'),
     208      'AfterDelete' => array($this, 'AfterModifyNetworkInterface'),
    203209    ));
    204210    $this->System->FormManager->RegisterClass('NetworkInterfaceType', array(
     
    594600    $this->System->ModuleManager->Modules['IS']->RegisterDashboardItem('Network',
    595601      array('ModuleNetwork', 'ShowDashboardItem'));
    596   }
    597 
     602
     603    $this->System->RegisterModel('NetworkDevice', array(
     604      'Title' => 'Síťové zařízení',
     605    ));
     606    $this->System->RegisterModel('NetworkInterface', array(
     607      'Title' => 'Síťové rozhraní',
     608    ));
     609  }
     610 
     611  function AfterInsertNetworkDevice($Form)
     612  {
     613    $this->System->Models['NetworkDevice']->DoOnChange();
     614  }
     615
     616  function AfterModifyNetworkDevice($Form, $Id)
     617  {
     618    $this->System->Models['NetworkDevice']->DoOnChange();
     619  }
     620 
     621  function AfterInsertNetworkInterface($Form)
     622  {
     623    $this->System->Models['NetworkInterface']->DoOnChange();
     624  }
     625
     626  function AfterModifyNetworkInterface($Form, $Id)
     627  {
     628    $this->System->Models['NetworkInterface']->DoOnChange();
     629  }
     630 
    598631  function ShowDashboardItem()
    599632  {
Note: See TracChangeset for help on using the changeset viewer.