Commits

matteosister  committed 08649d0 Merge

Merge pull request #2 from mmonguilod/master

removeAllTags(), thanks to mmonguilod

  • Participants
  • Parent commits 16e4327, 0449f2e

Comments (0)

Files changed (1)

File 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);
+    }
+}
+
 ";
     }