/** * Inserts the given $child node as first child of current * The modifications in the current object and the tree * are not persisted until the child object is saved. * * @param ChildCategory $child Propel object for child node * * @return $this|ChildCategory The current Propel object */ public function addChild(ChildCategory $child) { if ($this->isNew()) { throw new PropelException('A ChildCategory object must not be new to accept children.'); } $child->insertAsFirstChildOf($this); return $this; }