Object Model Framework
From KnowledgeTree Document Management Made Simple
Introduction
This document discusses internals of the KnowledgeTree framework.
Metadata Synchronisation
Inside of KnowledgeTree it is possible to update a metadata field containing lookup values. By using the KTMetadataUtil::synchroniseMetadata($oField, $aMetadata) function, you can send through an array of metadata values to update the existing ones. Those lookup values specified as being "Sticky" will be ignored while the others will be disabled and the new values will be added to the lookup list. This effectively allows you to synchronise a lookup set with an external lookup set/table and at the same time create exclusions for lookup values you don't want to be "overwritten" on synchronisation by setting these as "Sticky".
An example code snippet for using the synchronisation method would be:
require_once('../../config/dmsDefaults.php'); require_once(KT_LIB_DIR . '/metadata/metadatautil.inc.php');
$aNewValues = array(
'zxcv', 'asdfq', 'tgb', 'edrf',
);
$res = KTMetadataUtil::synchroniseMetadata(4, $aNewValues);
del.icio.us
reddit

