public function batchAssignTagsToElement($cType, array $cIds, array $tagIds, $replace)
{
if ($replace) {
$this->db->delete("tags_assignment", "ctype = " . $this->db->quote($cType) . " AND cid IN (" . implode(",", $cIds) . ")");
}
foreach ($tagIds as $tagId) {
foreach ($cIds as $cId) {
$this->doAddTagToElement($tagId, $cType, $cId);
}
}
}