*/
public function getBoxContentTitle() {
$this->getBoxContents();
- if ($this->isMultilingual || $this->boxType == 'system') {
+ if ($this->isMultilingual || $this->boxType === 'system') {
+ if ($this->boxType === 'system' && $this->getController()->getTitle()) {
+ return $this->getController()->getTitle();
+ }
+
if (isset($this->boxContents[WCF::getLanguage()->languageID])) {
return $this->boxContents[WCF::getLanguage()->languageID]->title;
}
]))->executeAction();
}
+ /**
+ * @inheritDoc
+ */
+ public function getTitle() {
+ return null;
+ }
+
/**
* Returns the additional data of the box.
*
*/
public function saveAdditionalData();
+ /**
+ * Returns the title of this box, the special value `null` can be returned to
+ * apply the default behavior as seen in previous versions. Only supported for
+ * system-type boxes.
+ *
+ * @return string|null
+ * @since 3.2
+ */
+ public function getTitle();
+
/**
* Returns a list of supported box positions.
*
*/
public $showRecord = true;
+ /**
+ * phrase that is used for the box title
+ * @var string|null
+ */
+ public $title;
+
/**
* @inheritDoc
*/
public function hasLink() {
return true;
}
+
+ /**
+ * @inheritDoc
+ */
+ public function getTitle() {
+ return $this->title;
+ }
}