Set the parent

@param mixed $parent

@return self
197627
public function setParent($parent){

            $this->parent = $parent;

            if($this->parentCallback){
                call_user_func($this->parentCallback);
            }

            return $this;

        }
330052
public function setInherited($inherited)
    {
        $this->inherited = (bool) $inherited;

        if ($inherited) {
            if (! $this->reflectionModel->isRoot()) {
                $rootRepo = Container::get($this->reflectionModel->getRoot()->getName());
                $this->rootConfig = $rootRepo->getConfig();
            }

            $this->table = $this->rootConfig->getTable();
        }

        return $this;
    }
240315
public function setParent(\Haven\CoreBundle\Entity\ExternalLink $parent = null)
    {
        $this->parent = $parent;
    
        return $this;
    }
969161
public function setParent(LeafRole $parent = null)
    {
        if ($parent && !$parent->getChildren()->contains($this)) {
            $parent->addChild($this);
        }
        $this->parent = $parent;

        return $this;
    }
1045118
public function setParentInstance(SiteTree $parent)
    {
        $this->parentInstance = $parent;
        
        $this->setStyleIDFrom($parent);
        
        return $this;
    }
1180456
public function setParent(CookieJar $parent = null)
	{
		$this->parent = $parent;

		if ($this->parent)
		{
			$this->enableParent();
			$this->parent->setChild($this);
		}
		else
		{
			$this->disableParent();
		}

		return $this;
	}
39862
public function parent($key):self
    {
        $breadcrumb = BreadcrumbFacade::get($key);
        $this->parents->put($key, $breadcrumb);

        return $this;
    }
543993
public function setParent(Pathfinder_Location $parent)
    {
        $this->setBasePath($parent->base_path.'/'.$this->_relative_path);
        $this->setBaseURL($parent->base_url.'/'.$this->_relative_path);

        return $this;
    }
347159
public function setParentId($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->parent_id !== $v) {
            $this->parent_id = $v;
            $this->modifiedColumns[PermissionTableMap::COL_PARENT_ID] = true;
        }

        if ($this->aPermissionRelatedByParentId !== null && $this->aPermissionRelatedByParentId->getId() !== $v) {
            $this->aPermissionRelatedByParentId = null;
        }

        return $this;
    }
410101
public function bindParent($parent, $parentPropertyName = null)
    {
        $this->parent = $parent;
        $this->parentPropertyName = $parentPropertyName;
        return $this;
    }
953339
public function setParent(AbstractParentNode $parent)
    {
        if (null !== $this->parent) {
            throw new \InvalidArgumentException('Node already got a parent!');
        }

        $this->parent = $parent;
    }
125443
public function setParent(FilterBuilderWithChildren $parent)
    {
        if ($this->parent && $this->parent !== $parent) {
            $this->parent->remove($this);
        }

        $this->parent = $parent;
        $this->parent->add($this);

        return $this;
    }
159351
public function set_parent(Node_Container $parent=null)
	{
		$this->parent = $parent;

		if($parent instanceof Node_Container_Document)
			$this->root = $parent;
		else
			$this->root = $parent->root();
	}
48161
public function setParent($parent, $from)
    {
        $this->_parent->{$this->_through}->setParent($parent, $from);
        return $this;
    }
846245
public function setParent($parent, $from)
    {
        $this->parents()->set($parent, $parent instanceof Document ? $from : '*');
        return $this;
    }
145594
private function setParent(&$parent)
    {
        if (! is_null($parent)) {
            $this->parent = $parent;

            $this->parent->elements->add($this);
        }

        return $this;
    }
1312390
public function setParent(\Haven\CoreBundle\Entity\Category $parent = null) {
        $this->parent = $parent;

        return $this;
    }