Brug logiske kroge (efter_gem eller før_gem f.eks.) på modulets gemmehandling.
-
Opret en logic_hooks.php i custom/modules/myModule /
<? $hook_array = Array(); $hook_array['after_save'] = Array(); $hook_array['after_save'][] = Array( 0, 'myName', 'custom/modules/myModule/logic_hooks/file.php', 'myClass', 'myMethod' ); ?>
-
Opret file.php i /custom/modules/myModule /logic_hooks/
<?php class myClass{ function myMethod(&$bean, $event, $arguments){ // Do something with $bean (e.g. store the custom DB value) } } ?>
For mere info se:dette link .