3 namespace wcf\data\modification\log
;
5 use wcf\data\DatabaseObjectDecorator
;
6 use wcf\data\user\UserProfile
;
7 use wcf\system\cache\runtime\UserProfileRuntimeCache
;
11 * Provides a viewable conversation modification log.
13 * @author Alexander Ebert
14 * @copyright 2001-2019 WoltLab GmbH
15 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
16 * @package WoltLabSuite\Core\Data\Modification\Log
18 * @method ModificationLog getDecoratedObject()
19 * @mixin ModificationLog
21 class ViewableConversationModificationLog
extends DatabaseObjectDecorator
26 protected static $baseClass = ModificationLog
::class;
32 protected $userProfile;
35 * Returns readable representation of current log entry.
39 public function __toString()
41 return WCF
::getLanguage()->getDynamicVariable(
42 'wcf.conversation.log.conversation.' . $this->action
,
43 ['additionalData' => $this->additionalData
]
48 * Returns the profile object of the user who created the modification entry.
52 public function getUserProfile()
54 if ($this->userProfile
=== null) {
56 $this->userProfile
= UserProfileRuntimeCache
::getInstance()->getObject($this->userID
);
58 $this->userProfile
= UserProfile
::getGuestUserProfile($this->username
);
62 return $this->userProfile
;