Author: jablko
Date: Wed Oct 27 15:02:07 2010
New Revision: 8571
Log:
Add slug to physical objects
Modified:
trunk/lib/model/QubitPhysicalObject.php
Modified: trunk/lib/model/QubitPhysicalObject.php
==============================================================================
--- trunk/lib/model/QubitPhysicalObject.php Wed Oct 27 14:28:37 2010
(r8570)
+++ trunk/lib/model/QubitPhysicalObject.php Wed Oct 27 15:02:07 2010
(r8571)
@@ -34,6 +34,16 @@
return (string) $this->getName();
}
+ public function insert($connection = null)
+ {
+ if (!isset($this->slug))
+ {
+ $this->slug = QubitSlug::slugify($this->name);
+ }
+
+ return parent::insert($connection);
+ }
+
public function getLabel()
{
$label = '';
--
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/qubit-commits?hl=en.