Set parentSection

@param Model $parentSection
@return Model
330703
public function setParentSection($parentSection)
	{
		if($this->parentSection !== $parentSection) {
			if($this->parentSection) {
				$this->parentSection->getSectionConfig()->removeNextSection($this->getParentDocument());
			}
			$this->parentSection = $parentSection;
			if($parentSection) {
				$parentSection->getSectionConfig()->addNextSection($this->getParentDocument());
			}
		}
		return $this;
	}
570359
public function setParent(\Neobazaar\Entity\Document $parent = null)
    {
        $this->parent = $parent;
    
        return $this;
    }
916370
public function setParentEntity($parentEntity)
    {
        if (!$parentEntity instanceof Entity && null !== $parentEntity) {
            throw new \InvalidArgumentException('The attribute parentEntity on the class Entity has to be Entity or null (' . gettype($parentEntity) . ('object' === gettype($parentEntity) ? ' ' . get_class($parentEntity) : '') . ' given).');
        }

        $this->parentEntity = $parentEntity;

        return $this;
    }
161791
public function setParent($parent) {
		if (! is_object($parent)) {
			throw new WrongParent('Parent of a helper must be an object, "' . gettype($parent) . '" was given');
		}
		
		$this->_parent = $parent;
		
		return $this;
	}
920222
public function setSection( Section$section=null ):self
	{
		if( !$section ){
			$this->sectionLevel= 0;
			$this->currentSection= null;

			return $this;
		}

		if( $this->currentSection ){
			$this->throw('Nesting definition of section is forbidden.');
		}

		if( isset($this->parent->sections[$section->name]) ){
			$this->throw("Section {$section->name} already defined.");
		}

		$this->currentSection= $section;

		if( $section->name ){
			$this->parent->sections[$section->name]=$section;
		}

		$this->sectionLevel= $this->level+1;

		return $this;
	}
463254
public function setParent(\Haven\PersonaBundle\Entity\Enterprise $parent = null) {
        $this->parent = $parent;

        return $this;
    }
448419
public function setParent($parent)
    {
        if (null === $parent) {
            $this->parent = null;

            return $this;
        }

        if (is_string($parent)) {
            $this->parent = new Role($parent);

            return $this;
        }

        if ($parent instanceof RoleInterface) {
            $this->parent = $parent;

            return $this;
        }

        throw Exception\InvalidRoleException::invalidRoleInstance($parent);
    }
1124780
public function setParent(Container $parent = null)
        {
            if ($parent === $this) {
                throw new Exception(
                    'A page cannot have itself as a parent');
            }

            // return if the given parent already is parent
            if ($parent === $this->_parent) {
                return $this;
            }

            // remove from old parent
            if (null !== $this->_parent) {
                $this->_parent->removePage($this);
            }

            // set new parent
            $this->_parent = $parent;

            // add to parent if page and not already a child
            if (null !== $this->_parent && !$this->_parent->hasPage($this, false)) {
                $this->_parent->addPage($this);
            }

            return $this;
        }
378349
protected function setParents()
		{
			// variables
			$segments   = explode('/', trim($this->route, '/'));
			$path       = '';

			// build parent routes
			foreach($segments as $segment)
			{
				$path .= $segment . '/';
				$this->parents[$segment] = $path;
			}

			// remove last parent
			array_pop($this->parents);
		}
390123
public function setSection($obj)
    {
        if ($obj instanceof SectionInterface) {
            $this->section = $obj;
        } else {
            $this->createSection();

            $this->section->load($obj);
        }

        return $this;
    }
538760
final public function internalSetParent(ParentNodeInterface $parent)
    {
        $this->emit('parent.change', [$parent, $this]);
        $this->parentNode = $parent;
    }
48161
public function setParent($parent, $from)
    {
        $this->_parent->{$this->_through}->setParent($parent, $from);
        return $this;
    }
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;
    }
862677
public function setSameParent(ModelInterface $receivingModel, ModelInterface $sourceModel, $parentTable)
    {
        if ($this->relationshipManager->isRoot($sourceModel)) {
            $this->relationshipManager->setRoot($receivingModel);

            return $this;
        }

        $this->relationshipManager->setSameParent($receivingModel, $sourceModel, $parentTable);

        return $this;
    }
388165
public function setParentFolder(Folder $parent_folder)
    {
        $this->parent_folder = ($this->getId() == 1) ? null : $parent_folder;

        return $this;
    }
1335309
public function setParent(self $parent = null)
    {
        $this->parent = $parent;
        if ($parent && !($this instanceof VirtualBusinessPage)) {
            $parent->addChild($this);
        }
    }
263607
public function setMainSection(Section $section)
    {
        if ($section === $this->_mainsection) {
            return $this;
        }

        $this->_mainsection = $section;
        $this->_position = 0;
        $this->_level = $section->getLevel();
        $section->setPage($this);

        return $this->setSection($section);
    }