}
/**
- * @inheritDoc
+ * Reads the i18n data for the given object.
+ *
+ * @param DatabaseObject $databaseObject
*/
public function readDataI18n(DatabaseObject $databaseObject) {
if (empty($_POST) && !empty($this->i18nValues)) {
}
}
+ /**
+ * Saves the i18n data for the given database object befor the changes of
+ * the given database object are saved.
+ *
+ * @param DatabaseObject $databaseObject
+ * @return string[]
+ */
public function beforeSaveI18n(DatabaseObject $databaseObject) {
$values = [];
}
/**
- * @inheritDoc
+ * Saves the i18n data for the given database object after the given database
+ * object has been created.
+ *
+ * @param DatabaseObject $databaseObject
+ * @return string[]
*/
public function saveI18n(DatabaseObject $databaseObject, $editorClass) {
$data = [];
];
}
+ /**
+ * Validates the `loadComment` action.
+ */
public function validateLoadComment() {
$this->readInteger('objectID', false, 'data');
$this->readInteger('responseID', true, 'data');
}
}
+ /**
+ * Returns a rendered comment.
+ *
+ * @return string[]
+ */
public function loadComment() {
if ($this->comment === null) {
return ['template' => ''];
return (is_array($returnValues)) ? $returnValues : ['template' => $returnValues];
}
+ /**
+ * Validates the `loadResponse` action.
+ */
public function validateLoadResponse() {
$this->validateLoadComment();
}
+ /**
+ * Returns a rendered comment.
+ *
+ * @return string[]
+ */
public function loadResponse() {
if ($this->comment === null || $this->response === null) {
return ['template' => ''];
return WCF::getPath().'images/stylePreview@2x.png';
}
+ /**
+ * Returns the absolute path to the apple touch icon.
+ *
+ * @return string
+ */
public function getFaviconAppleTouchIcon() {
return $this->getFaviconPath('apple-touch-icon.png');
}
+ /**
+ * Returns the absolute path to the `manifest.json` file.
+ *
+ * @return string
+ */
public function getFaviconManifest() {
return $this->getFaviconPath('manifest.json');
}
+ /**
+ * Returns the absolute path to the `browserconfig.xml` file.
+ *
+ * @return string
+ */
public function getFaviconBrowserconfig() {
return $this->getFaviconPath('browserconfig.xml');
}
+ /**
+ * Returns the relative path to the favicon.
+ *
+ * @return string
+ */
public function getRelativeFavicon() {
return $this->getFaviconPath('favicon.ico', false);
}
+ /**
+ * Returns the path to a favicon-related file.
+ *
+ * @param string $filename name of the file
+ * @param boolean $absolutePath if `true`, the absolute path is returned, otherwise the path relative to WCF is returned
+ * @return string
+ */
protected function getFaviconPath($filename, $absolutePath = true) {
if ($filename === 'manifest.json') {
if (ApplicationHandler::getInstance()->getActiveApplication()->domainName !== ApplicationHandler::getInstance()->getApplicationByID(1)->domainName) {