[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-developers] custom functions
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-developers] custom functions |
Date: |
Mon, 27 Mar 2006 12:13:16 +0200 (CEST) |
I have a very nice feature in property for custom implementation without
breaking the official code.
Right after a storage operation (add/edit) the data-set is fed into custom
functions for this location.
The actual funtion is stored as files in appname/inc/custom - and enabled
trough an interface per acl_location.
This is usefull for integration with surrounding systems - or cusmtomization of
the type "if a special category of something is saved or altered" - you want to
perform a spesific action of some sort
example:
Admin->property->Admin custom functions
Applying the code is very easy (from class.boentity.inc.php in property):
$custom_functions =
$this->soadmin_entity->read_custom_function(array('acl_location' =>
$acl_location,'allrows'=>True));
if (isSet($custom_functions) AND is_array($custom_functions))
{
foreach($custom_functions as $entry)
{
if (is_file(PHPGW_APP_INC . SEP . 'custom' . SEP .
$entry['file_name']) && $entry['active'])
include (PHPGW_APP_INC . SEP . 'custom' . SEP .
$entry['file_name']);
}
}
Something for the other apps?
Regards
Sigurd
- [Phpgroupware-developers] custom functions,
Sigurd Nes <=