* @package com.woltlab.wcf
* @subpackage data
* @category Community Framework
+ *
+ * @property-read string|null $className
*/
class ProcessibleDatabaseObject extends DatabaseObject {
/**
// links of top option category menu items need the id of the option
// category
if ($this->parentMenuItem == 'wcf.acp.menu.link.option.category') {
+ /** @noinspection PhpUndefinedFieldInspection */
$linkParameters['id'] = $this->optionCategoryID;
}
* @property-read string $userAgent
* @property-read integer $time
* @property-read integer $lastActivityTime
+ * @property-read string|null $active
*/
class ACPSessionLog extends DatabaseObject {
/**
$objectType = ObjectTypeCache::getInstance()->getObjectType($this->objectTypeID);
$location = WCF::getLanguage()->get('wcf.acp.ad.location.'.$objectType->objectType);
+ /** @noinspection PhpUndefinedFieldInspection */
if ($objectType->categoryname != 'com.woltlab.wcf.global') {
+ /** @noinspection PhpUndefinedFieldInspection */
$location = WCF::getLanguage()->get('wcf.acp.ad.location.category.'.$objectType->categoryname).': '.$location;
}
* @inheritDoc
*/
public function sendNotification(Like $like) {
- $objectType = CommentHandler::getInstance()->getObjectType($this->object->objectTypeID);
+ $objectType = CommentHandler::getInstance()->getObjectType($this->getDecoratedObject()->objectTypeID);
if (UserNotificationHandler::getInstance()->getObjectTypeID($objectType->objectType.'.like.notification')) {
if ($this->userID != WCF::getUser()->userID) {
$notificationObject = new LikeUserNotificationObject($like);
UserNotificationHandler::getInstance()->fireEvent('like', $objectType->objectType.'.like.notification', $notificationObject, [$this->userID], [
- 'objectID' => $this->object->objectID,
+ 'objectID' => $this->getDecoratedObject()->objectID,
'objectOwnerID' => $this->userID
]);
}
* @inheritDoc
*/
public function checkPermissions(ILikeObject $comment) {
+ /** @var Comment $comment */
+
if (!$comment->commentID) return false;
$objectType = CommentHandler::getInstance()->getObjectType($comment->objectTypeID);
* @inheritDoc
*/
public function sendNotification(Like $like) {
- $comment = new Comment($this->object->commentID);
+ $comment = new Comment($this->getDecoratedObject()->commentID);
$objectType = CommentHandler::getInstance()->getObjectType($comment->objectTypeID);
if (UserNotificationHandler::getInstance()->getObjectTypeID($objectType->objectType.'.response.like.notification')) {
if ($this->userID != WCF::getUser()->userID) {
* @inheritDoc
*/
public function checkPermissions(ILikeObject $response) {
+ /** @var CommentResponse $response */
+
if (!$response->responseID) return false;
$comment = new Comment($response->commentID);
if (!$comment->commentID) {
* @return integer
*/
public static function sortLabelGroups(DatabaseObject $groupA, DatabaseObject $groupB) {
+ /** @noinspection PhpUndefinedFieldInspection */
if ($groupA->showOrder == $groupB->showOrder) {
+ /** @noinspection PhpUndefinedFieldInspection */
return ($groupA->groupID > $groupB->groupID) ? 1 : -1;
}
+ /** @noinspection PhpUndefinedFieldInspection */
return ($groupA->showOrder > $groupB->showOrder) ? 1 : -1;
}
}
* @property-read string $countryCode
* @property-read integer $isDefault
* @property-read integer $hasContent
+ * @property-read integer $isDisabled
*/
class Language extends DatabaseObject {
/**
/** @noinspection PhpUndefinedMethodInspection */
$this->parameters['__files']->saveFiles($saveStrategy);
+
+ /** @var Media[] $mediaFiles */
$mediaFiles = $saveStrategy->getObjects();
$result = [
*
* @method Media getDecoratedObject()
* @mixin Media
+ * @property-read string|null $title
+ * @property-read string|null $description
+ * @property-read string|null $altText
*/
class ViewableMedia extends DatabaseObjectDecorator {
/**
/**
* Adds an option to current poll.
*
- * @param \wcf\data\poll\option\PollOption $option
+ * @param PollOption $option
*/
public function addOption(PollOption $option) {
if ($option->pollID == $this->pollID) {
$this->options[$option->optionID] = $option;
+ /** @noinspection PhpUndefinedFieldInspection */
if ($option->voted) {
$this->isParticipant = true;
}
foreach ($optionList as $option) {
$this->options[$option->optionID] = $option;
+ /** @noinspection PhpUndefinedFieldInspection */
if ($option->voted) {
$this->isParticipant = true;
}
* @return string
*/
public function getPath() {
+ /** @noinspection PhpUndefinedFieldInspection */
$path = FileUtil::getRealPath(WCF_DIR . $this->packageDir) . 'templates/' . $this->templateGroupFolderName . $this->templateName . '.tpl';
return $path;
}
* @package com.woltlab.wcf
* @subpackage data.template
* @category Community Framework
+ *
+ * @method Template current()
+ * @method Template[] getObjects()
+ * @method Template|null search($objectID)
+ * @property Template[] $objects
*/
class TemplateList extends DatabaseObjectList {
/**
public function validateSwitchContext() { }
public function switchContext() {
+ /** @noinspection PhpUndefinedFieldInspection */
$userAction = new UserAction([WCF::getUser()], 'update', [
'options' => [
User::getUserOptionID('recentActivitiesFilterByFollowing') => (WCF::getUser()->recentActivitiesFilterByFollowing ? 0 : 1)
* @property-read integer|null $pageID
* @property-read integer|null $pageObjectID
* @property-read integer|null $parentPageObjectID
+ * @property-read string|null $userOnlineMarking
*/
class UserOnline extends UserProfile {
/**