public function addSlot(sfSympalContentSlot $slot) { $this->removeSlot($slot); $contentSlotRef = new sfSympalContentSlotRef(); $contentSlotRef->content_slot_id = $slot->id; $contentSlotRef->content_id = $this->id; $contentSlotRef->save(); $this->_slotsByName[$slot->name] = $slot; return $contentSlotRef; }
public function addSlot(sfSympalContentSlot $slot) { $this->removeSlot($slot); $contentSlotRef = new sfSympalContentSlotRef(); $contentSlotRef->content_slot_id = $slot->id; $contentSlotRef->content_id = $this->id; $contentSlotRef->save(); // make sure the slots are initialized $this->getSlotsByName(); $this->_slotsByName[$slot->name] = $slot; return $contentSlotRef; }