$this->objectAction->executeAction();
// delete old conditions
- if ($this->box->getController() && $this->box->getController() instanceof IConditionBoxController && $this->box->getController()->getConditionDefinition() && (!$this->boxController || (!($this->boxController->getProcessor() instanceof IConditionBoxController)) || !$this->boxController->getProcessor()->getConditionDefinition())) {
- ConditionHandler::getInstance()->deleteConditions($this->box->getController()->getConditionDefinition(), [$this->box->boxID]);
+ if ($this->box->getController() && $this->box->getController() instanceof IConditionBoxController) {
+ /** @var IConditionBoxController $oldController */
+ $oldController = $this->box->getController();
+
+ /** @noinspection PhpUndefinedMethodInspection */
+ if ($oldController->getConditionDefinition() && (!$this->boxController || (!($this->boxController->getProcessor() instanceof IConditionBoxController)) || !$this->boxController->getProcessor()->getConditionDefinition())) {
+ ConditionHandler::getInstance()->deleteConditions($oldController->getConditionDefinition(), [$this->box->boxID]);
+ }
}
if ($this->boxController) {
<?php
namespace wcf\data\article;
+use wcf\data\article\content\ArticleContent;
use wcf\data\article\content\ViewableArticleContent;
use wcf\data\media\ViewableMedia;
use wcf\data\user\User;
* @package WoltLabSuite\Core\Data\Article
* @since 3.0
*
- * @method Article getDecoratedObject()
+ * @method Article getDecoratedObject()
+ * @method ArticleContent|ViewableArticleContent getArticleContent()
* @mixin Article
*/
class ViewableArticle extends DatabaseObjectDecorator {
* @property-read integer $linkPageObjectID id of the object the (internal) page links refers to or `0` if no internal link is used or no specific object is linked
* @property-read string $externalURL external link used to for the box image and box title or empty if no external link is set
* @property-read array $additionalData array with additional data of the box
+ * @property-read integer|null $limit number of objects shown in the box for `AbstractDatabaseObjectListBoxController` controllers or `null` otherwise
+ * @property-read string|null $sortField sort field of the objects shown in the box for `AbstractDatabaseObjectListBoxController` controllers or `null` otherwise
+ * @property-read string|null $sortOrder sort order of the objects shown in the box for `AbstractDatabaseObjectListBoxController` controllers or `null` otherwise
*/
class Box extends DatabaseObject {
/**
use wcf\data\search\SearchEditor;
use wcf\system\database\util\PreparedStatementConditionBuilder;
use wcf\system\exception\UserInputException;
+use wcf\system\option\user\UserOptionHandler;
use wcf\system\page\PageLocationManager;
use wcf\system\request\LinkHandler;
use wcf\system\WCF;
* @copyright 2001-2016 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Form
+ *
+ * @property UserOptionHandler $optionHandler
*/
class UserSearchForm extends UserOptionListForm {
/**
*/
public static function destruct() {
if (self::getReader() !== null && self::getReader()->getHistory() instanceof DatabaseCLICommandHistory) {
- self::getReader()->getHistory()->save();
- self::getReader()->getHistory()->autoSave = false;
+ /** @var DatabaseCLICommandHistory $history */
+ $history = self::getReader()->getHistory();
+
+ $history->save();
+ $history->autoSave = false;
}
self::getSession()->delete();
*/
public function getActionObjectTypeDefinition() {
if (empty($this->actionObjectTypeDefinition)) {
- $this->actionObjectTypeDefinition = $this->object->objectType.'.action';
+ $this->actionObjectTypeDefinition = $this->getDecoratedObject()->objectType.'.action';
}
return $this->actionObjectTypeDefinition;
*/
public function getConditionObjectTypeDefinition() {
if (empty($this->conditionObjectTypeDefinition)) {
- $this->conditionObjectTypeDefinition = $this->object->objectType.'.condition';
+ $this->conditionObjectTypeDefinition = $this->getDecoratedObject()->objectType.'.condition';
}
return $this->conditionObjectTypeDefinition;
public function getLanguageItemPrefix() {
if (empty($this->languageItemPrefix)) {
$application = explode('\\', get_class($this))[0];
- $objectTypePieces = explode('.', $this->object->objectType);
+ $objectTypePieces = explode('.', $this->getDecoratedObject()->objectType);
$this->languageItemPrefix = $application.'.acp.'.end($objectTypePieces).'.bulkProcessing';
}
$progressbar->update($progress, $currentAction);
}
- $progressbar->getAdapter()->finish();
+ $progressbar->finish();
}
/**
$progressbar->update($progress, $currentAction);
}
- $progressbar->getAdapter()->finish();
+ $progressbar->finish();
}
/**
}
$progressbar->update($progress);
- $progressbar->getAdapter()->finish();
+ $progressbar->finish();
}
/**
use wcf\system\cache\runtime\CommentRuntimeCache;
use wcf\system\cache\runtime\UserProfileRuntimeCache;
use wcf\system\email\Email;
+use wcf\system\user\notification\object\CommentResponseUserNotificationObject;
/**
* User notification event for profile comment responses.
* @copyright 2001-2016 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\User\Notification\Event
+ *
+ * @method CommentResponseUserNotificationObject getUserNotificationObject()
*/
class UserProfileCommentResponseUserNotificationEvent extends AbstractSharedUserNotificationEvent {
/**
* @inheritDoc
*/
public function getEventHash() {
- return sha1($this->eventID . '-' . $this->userNotificationObject->commentID);
+ return sha1($this->eventID . '-' . $this->getUserNotificationObject()->commentID);
}
}
foreach ($it as $filename => $obj) {
// ignore . and ..
+ /** @noinspection PhpUndefinedMethodInspection */
if ($it->isDot()) continue;
$this->files[FileUtil::unifyDirSeparator($filename)] = FileUtil::unifyDirSeparator($filename);
foreach ($it as $filename => $obj) {
// ignore . and ..
+ /** @noinspection PhpUndefinedMethodInspection */
if ($it->isDot()) continue;
$this->fileObjects[FileUtil::unifyDirSeparator($filename)] = $obj;
if (!empty($this->postParameters)) {
$iterator = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($this->postParameters), \RecursiveIteratorIterator::SELF_FIRST);
foreach ($iterator as $k => $v) {
+ /** @noinspection PhpUndefinedMethodInspection */
if (!$iterator->hasChildren()) {
$key = '';
for ($i = 0, $max = $iterator->getDepth(); $i <= $max; $i++) {
$iterator = new \RecursiveIteratorIterator(new \RecursiveArrayIterator($this->files), \RecursiveIteratorIterator::SELF_FIRST);
foreach ($iterator as $k => $v) {
+ /** @noinspection PhpUndefinedMethodInspection */
if (!$iterator->hasChildren()) {
$key = '';
for ($i = 0, $max = $iterator->getDepth(); $i <= $max; $i++) {