partly fix splitway for relations (still lots of FIXMEs, but the perfect is the enemy...
[potlatch2.git] / net / systemeD / halcyon / connection / Entity.as
index 8f9d5acdabc3a57ce6f3dd94bbff8b892620477a..b11a5b2fd80d98b1f9f9fcc9681ac037a2c2671e 100644 (file)
@@ -189,6 +189,20 @@ package net.systemeD.halcyon.connection {
             return parents[entity] == true;
         }
 
+               public function get memberships():Array {
+                       var list:Array=[];
+                       for (var o:Object in parents) {
+                               if (o is Relation) {
+                                       for (var i:uint=0; i<o.length; i++) {
+                                               if (o.getMember(i).entity==this) {
+                                                       list.push( { relation:o, position:i, role: o.getMember(i).role } );
+                                               }
+                                       }
+                               }
+                       }
+                       return list;
+               }
+
                // Resume/suspend redraw
                
                public function suspend():void {