public function log($userId, bdSocialShare_Shareable_Abstract $shareable, $target, $targetId, $sharedId = '', array $bulkSet = array()) { if ($shareable->getId()) { $dw = XenForo_DataWriter::create('bdSocialShare_DataWriter_Log'); $dw->set('user_id', $userId); $dw->set('log_date', XenForo_Application::$time); $dw->set('shareable_class', get_class($shareable)); $dw->set('shareable_id', $shareable->getId()); $dw->set('target', $target); $dw->set('target_id', $targetId); $dw->set('shared_id', $sharedId); $dw->bulkSet($bulkSet); $dw->save(); return $dw->getMergedData(); } else { return false; } }