Add missing method documentation
authorMatthias Schmidt <gravatronics@live.com>
Sun, 26 Nov 2017 16:16:00 +0000 (17:16 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 26 Nov 2017 16:16:00 +0000 (17:16 +0100)
wcfsetup/install/files/lib/acp/form/AbstractAcpForm.class.php
wcfsetup/install/files/lib/data/comment/CommentAction.class.php
wcfsetup/install/files/lib/data/style/Style.class.php

index 109aa1e53b113339aa773feef9a4bed99bffe6a2..068a2c09be7390fa70a7b19f469aa9e9aa622736 100644 (file)
@@ -97,7 +97,9 @@ abstract class AbstractAcpForm extends AbstractForm {
        }
        
        /**
-        * @inheritDoc
+        * Reads the i18n data for the given object.
+        * 
+        * @param       DatabaseObject          $databaseObject
         */
        public function readDataI18n(DatabaseObject $databaseObject) {
                if (empty($_POST) && !empty($this->i18nValues)) {
@@ -112,6 +114,13 @@ abstract class AbstractAcpForm extends AbstractForm {
                }
        }
        
+       /**
+        * 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 = [];
                
@@ -139,7 +148,11 @@ abstract class AbstractAcpForm extends AbstractForm {
        }
        
        /**
-        * @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 = [];
index 1929ccbe257eec5063f268f849c4a67ac9275556..7eeaa6d3099f4c2d91f3aa027a991f69b0872bb7 100644 (file)
@@ -206,6 +206,9 @@ class CommentAction extends AbstractDatabaseObjectAction implements IMessageInli
                ];
        }
        
+       /**
+        * Validates the `loadComment` action.
+        */
        public function validateLoadComment() {
                $this->readInteger('objectID', false, 'data');
                $this->readInteger('responseID', true, 'data');
@@ -231,6 +234,11 @@ class CommentAction extends AbstractDatabaseObjectAction implements IMessageInli
                }
        }
        
+       /**
+        * Returns a rendered comment.
+        * 
+        * @return      string[]
+        */
        public function loadComment() {
                if ($this->comment === null) {
                        return ['template' => ''];
@@ -243,10 +251,18 @@ class CommentAction extends AbstractDatabaseObjectAction implements IMessageInli
                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' => ''];
index ecfd258b1fc45b8b402069bb1f4ba3f95e62cedf..1844e91389d03f49796123dd0abde1195e555578 100644 (file)
@@ -150,22 +150,49 @@ class Style extends DatabaseObject {
                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) {