In fact the setLabels() method explicitly support passing an empty list of label ids, effectively purging the previously set labels.
return $data;
}
- /**
- * Removes all previously assigned labels.
- *
- * @param integer $objectTypeID
- * @param integer $objectID
- * @param boolean $validatePermissions
- * @see \wcf\system\label\LabelHandler::setLabel()
- */
- public function removeLabels($objectTypeID, $objectID, $validatePermissions = true) {
- $this->setLabel(array(), $objectTypeID, $objectID, $validatePermissions);
- }
-
/**
* Returns given label groups by id.
*