Rename `getId()` to `getElementID()`
authorAlexander Ebert <ebert@woltlab.com>
Thu, 5 Oct 2023 16:09:02 +0000 (18:09 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Sun, 8 Oct 2023 15:54:39 +0000 (17:54 +0200)
The naming is more in line with the PHP API and makes it clear that this is not the label group’s id.

wcfsetup/install/files/acp/templates/articleAdd.tpl
wcfsetup/install/files/lib/system/label/LabelPicker.class.php

index 08422a37372fc27b35f794accab894f51543957c..d9e999885ee7a4ec2f834135f6dcf452a538e51c 100644 (file)
                
                {foreach from=$labelPickers item=labelPicker}
                        <dl>
-                               <dt><label for="{$labelPicker->getId()}">{$labelPicker->labelGroup->getTitle()}</label></dt>
+                               <dt><label for="{$labelPicker->getElementID()}">{$labelPicker->labelGroup->getTitle()}</label></dt>
                                <dd>
                                        {@$labelPicker->toHtml()}
                                        {if $errorField == 'label' && $errorType[$labelPicker->labelGroup->groupID]|isset}
index 75ebcfc19756ff62bc8c59cce160b5215ee3076b..60322c603ab8ba8736063d6dc143cf63c02fa253 100644 (file)
@@ -35,14 +35,14 @@ final class LabelPicker
                 ></woltlab-core-label-picker>
             EOT,
             $this->selected,
-            $this->getId(),
+            $this->getElementID(),
             $this->labelGroup->getTitle(),
             StringUtil::encodeHTML(JSON::encode($labels)),
             $this->labelGroup->groupID,
         );
     }
 
-    public function getId(): string
+    public function getElementID(): string
     {
         return "labelGroup{$this->labelGroup->groupID}";
     }