本文整理汇总了PHP中Tinebase_Record_Abstract::getModlogOmitFields方法的典型用法代码示例。如果您正苦于以下问题:PHP Tinebase_Record_Abstract::getModlogOmitFields方法的具体用法?PHP Tinebase_Record_Abstract::getModlogOmitFields怎么用?PHP Tinebase_Record_Abstract::getModlogOmitFields使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tinebase_Record_Abstract
的用法示例。
在下文中一共展示了Tinebase_Record_Abstract::getModlogOmitFields方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: writeModLog
/**
* computes changes of records and writes them to the logbook
*
* NOTE: expects last_modified_by and last_modified_time to be set
* properly in the $_newRecord
*
* @param Tinebase_Record_Abstract $_newRecord record from user data
* @param Tinebase_Record_Abstract $_curRecord record from storage
* @param string $_model
* @param string $_backend
* @param string $_id
* @return Tinebase_Record_RecordSet RecordSet of Tinebase_Model_ModificationLog
*/
public function writeModLog($_newRecord, $_curRecord, $_model, $_backend, $_id)
{
$commonModLog = $this->_getCommonModlog($_model, $_backend, array('last_modified_time' => $_newRecord->last_modified_time, 'last_modified_by' => $_newRecord->last_modified_by), $_id);
$diffs = $_curRecord->diff($_newRecord);
if (!empty($diffs) && Tinebase_Core::isLogLevel(Zend_Log::TRACE)) {
Tinebase_Core::getLogger()->trace(__METHOD__ . '::' . __LINE__ . ' diffs: ' . print_r($diffs, TRUE));
}
if (!empty($diffs) && Tinebase_Core::isLogLevel(Zend_Log::TRACE)) {
Tinebase_Core::getLogger()->trace(__METHOD__ . '::' . __LINE__ . ' curRecord: ' . print_r($_curRecord->toArray(), TRUE));
}
$modifications = new Tinebase_Record_RecordSet('Tinebase_Model_ModificationLog');
$this->_loopModifications($diffs, $commonModLog, $modifications, $_curRecord->toArray(), $_curRecord->getModlogOmitFields());
if (Tinebase_Core::isLogLevel(Zend_Log::DEBUG)) {
Tinebase_Core::getLogger()->debug(__METHOD__ . '::' . __LINE__ . ' Logged ' . count($modifications) . ' modifications.');
}
return $modifications;
}