Commits

Manel Monguilod committed 0449f2e

Added function removeAllTags

Comments (0)

Files changed (1)

lib/behavior/TaggableBehavior.php

             \$this->addTag(\$theTag);
     }
 }      
+
+/**
+ * Remove all tags
+ * @param      PropelPDO \$con optional connection object
+ */
+public function removeAllTags(PropelPDO \$con = null) {
+      // Get all tags for this object
+    \$taggings = \$this->get{$this->taggingTable->getPhpName()}s(\$con);
+    foreach (\$taggings as \$tag) {
+      \$tag->delete(\$con);
+    }
+}
+
 ";
     }