mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-03-12 08:55:54 +00:00
add callbacks on onPostUpdateAttribute and onPostAddAttribute
This commit is contained in:
parent
efc724e773
commit
c9fae356b3
|
@ -259,6 +259,14 @@ class SeedDMS_Core_Attribute { /* {{{ */
|
||||||
|
|
||||||
$this->_value = $value;
|
$this->_value = $value;
|
||||||
|
|
||||||
|
/* Check if 'onPostUpdateAttribute' callback is set */
|
||||||
|
if(isset($this->_dms->callbacks['onPostUpdateAttribute'])) {
|
||||||
|
foreach($this->_dms->callbacks['onPostUpdateAttribute'] as $callback) {
|
||||||
|
if(!call_user_func($callback[0], $callback[1], $this->_obj, $this->_attrdef, $value)) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
|
|
@ -269,6 +269,15 @@ class SeedDMS_Core_Object { /* {{{ */
|
||||||
$attr = new SeedDMS_Core_Attribute($db->getInsertID($tablename), $this, $attrdef, $value);
|
$attr = new SeedDMS_Core_Attribute($db->getInsertID($tablename), $this, $attrdef, $value);
|
||||||
$attr->setDMS($this->_dms);
|
$attr->setDMS($this->_dms);
|
||||||
$this->_attributes[$attrdef->getId()] = $attr;
|
$this->_attributes[$attrdef->getId()] = $attr;
|
||||||
|
|
||||||
|
/* Check if 'onPostAddAttribute' callback is set */
|
||||||
|
if(isset($this->_dms->callbacks['onPostAddAttribute'])) {
|
||||||
|
foreach($this->_dms->callbacks['onPostAddAttribute'] as $callback) {
|
||||||
|
if(!call_user_func($callback[0], $callback[1], $this, $attrdef, $value)) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,7 @@
|
||||||
- getLastWorkflowLog() returns a workflow entry even if the workflow has ended
|
- getLastWorkflowLog() returns a workflow entry even if the workflow has ended
|
||||||
- backport setFileType() from 6.0.x
|
- backport setFileType() from 6.0.x
|
||||||
- add SeedDMS_Core_File::fileExtension()
|
- add SeedDMS_Core_File::fileExtension()
|
||||||
|
- add callbacks on onPostUpdateAttribute and onPostAddAttribute
|
||||||
</notes>
|
</notes>
|
||||||
<contents>
|
<contents>
|
||||||
<dir baseinstalldir="SeedDMS" name="/">
|
<dir baseinstalldir="SeedDMS" name="/">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user