Fix code formatting
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / data / user / option / UserOption.class.php
index 8a349df4064937bccb801027b5abdeda4e31b4e4..23f0a873853fed465b360db9284638e76408c40b 100644 (file)
@@ -8,7 +8,7 @@ use wcf\system\WCF;
  * Represents a user option.
  * 
  * @author     Marcel Werk
- * @copyright  2001-2013 WoltLab GmbH
+ * @copyright  2001-2014 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @package    com.woltlab.wcf
  * @subpackage data.user.option
@@ -76,12 +76,12 @@ class UserOption extends Option {
        const EDITABILITY_ALL = 3;
        
        /**
-        * @see wcf\data\DatabaseObject::$databaseTableName
+        * @see \wcf\data\DatabaseObject::$databaseTableName
         */
        protected static $databaseTableName = 'user_option';
        
        /**
-        * @see wcf\data\DatabaseObject::$databaseTableIndexName
+        * @see \wcf\data\DatabaseObject::$databaseTableIndexName
         */
        protected static $databaseTableIndexName = 'optionID';
        
@@ -93,21 +93,21 @@ class UserOption extends Option {
        
        /**
         * user object
-        * @var wcf\data\user\User
+        * @var \wcf\data\user\User
         */
        public $user = null;
        
        /**
         * Sets target user object.
         * 
-        * @param       wcf\data\user\User      $user
+        * @param       \wcf\data\user\User     $user
         */
        public function setUser(User $user) {
                $this->user = $user;
        }
        
        /**
-        * @see wcf\data\option\Option::isVisible()
+        * @see \wcf\data\option\Option::isVisible()
         */
        public function isVisible() {
                // proceed if option is visible for all
@@ -159,4 +159,17 @@ class UserOption extends Option {
                
                return false;
        }
+       
+       /**
+        * Returns true if this user option can be deleted.
+        * 
+        * @return      boolean
+        */
+       public function canDelete() {
+               if ($this->originIsSystem) {
+                       return false;
+               }
+               
+               return true;
+       }
 }