Example #1
0
 /**
  * Set the parent and return self.
  *
  * @param FilterBuilderWithChildren $parent The new parent.
  *
  * @return FilterBuilderWithChildren
  */
 public function setParent(FilterBuilderWithChildren $parent)
 {
     if ($this->parent && $this->parent !== $parent) {
         $this->parent->remove($this);
     }
     $this->parent = $parent;
     $this->parent->add($this);
     return $this;
 }