Adds AbstractClipboardAction::getEditorLabel()
authorMatthias Schmidt <gravatronics@live.com>
Wed, 9 Jan 2013 21:34:42 +0000 (22:34 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Wed, 9 Jan 2013 21:34:42 +0000 (22:34 +0100)
wcfsetup/install/files/lib/system/clipboard/action/AbstractClipboardAction.class.php
wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php

index 0fe1a4fae8b31bbf0cd4bed171231c96f9f2c165..0190301e485b33c8873cec0a3a7a83930d75cb36 100644 (file)
@@ -2,6 +2,7 @@
 namespace wcf\system\clipboard\action;
 use wcf\system\clipboard\ClipboardEditorItem;
 use wcf\system\exception\SystemException;
+use wcf\system\WCF;
 
 /**
  * Abstract implementation of a clipboard action handler.
@@ -44,14 +45,11 @@ abstract class AbstractClipboardAction implements IClipboardAction {
                
                $item = new ClipboardEditorItem();
                $item->setName($this->getTypeName().'.'.$actionName);
-               
-               // set action class-related data
                if (in_array($actionName, $this->actionClassActions)) {
                        $item->addParameter('actionName', $actionName);
                        $item->addParameter('className', $this->getClassName());
                }
                
-               // validate objects if relevant method exists and set valid object ids
                $methodName = 'validate'.ucfirst($actionName);
                if (method_exists($this, $methodName)) {
                        $objectIDs = $this->$methodName();
@@ -71,4 +69,13 @@ abstract class AbstractClipboardAction implements IClipboardAction {
        public function filterObjects(array $objects, array $typeData) {
                return $objects;
        }
+       
+       /**
+        * @see wcf\system\clipboard\action\IClipboardAction::getEditorLabel()
+        */
+       public function getEditorLabel(array $objects) {
+               return WCF::getLanguage()->getDynamicVariable('wcf.clipboard.label.'.$this->getTypeName().'.marked', array(
+                       'count' => count($objects)
+               ));
+       }
 }
index 36f19ac564dcfd3a591b6566fa3b24b15b6d161d..0b0fe57652ee3c5b74e1b07b18e7bcf53aff67fc 100644 (file)
@@ -124,13 +124,4 @@ class UserClipboardAction extends AbstractClipboardAction {
                
                return $userIDs;
        }
-       
-       /**
-        * @see wcf\system\clipboard\action\IClipboardAction::getEditorLabel()
-        */
-       public function getEditorLabel(array $objects) {
-               return WCF::getLanguage()->getDynamicVariable('wcf.clipboard.label.com.woltlab.wcf.user.marked', array(
-                       'count' => count($objects)
-               ));
-       }
 }