Method called to associate a ChildGroup object to this object
through the ChildGroup foreign key attribute.

@param  ChildGroup $l ChildGroup
@return $this|\gossi\trixionary\model\Sport The current object (for fluent API support)
352661
public function addGroup(ChildGroup $l)
    {
        if ($this->collGroups === null) {
            $this->initGroups();
            $this->collGroupsPartial = true;
        }

        if (!$this->collGroups->contains($l)) {
            $this->doAddGroup($l);
        }

        return $this;
    }
1013144
public function addSkillRelatedByEndPositionId(ChildSkill $l)
    {
        if ($this->collSkillsRelatedByEndPositionId === null) {
            $this->initSkillsRelatedByEndPositionId();
            $this->collSkillsRelatedByEndPositionIdPartial = true;
        }

        if (!$this->collSkillsRelatedByEndPositionId->contains($l)) {
            $this->doAddSkillRelatedByEndPositionId($l);
        }

        return $this;
    }
705082
public function addPage(ChildPage $l)
    {
        if ($this->collPages === null) {
            $this->initPages();
            $this->collPagesPartial = true;
        }

        if (!$this->collPages->contains($l)) {
            $this->doAddPage($l);

            if ($this->pagesScheduledForDeletion and $this->pagesScheduledForDeletion->contains($l)) {
                $this->pagesScheduledForDeletion->remove($this->pagesScheduledForDeletion->search($l));
            }
        }

        return $this;
    }
371568
public function setAttribute(ChildAttribute $v = null)
    {
        if ($v === null) {
            $this->setAttributeId(NULL);
        } else {
            $this->setAttributeId($v->getId());
        }

        $this->aAttribute = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildAttribute object, it will not be re-added.
        if ($v !== null) {
            $v->addAttributeAttributeType($this);
        }


        return $this;
    }
479489
public function addFeaturedSkill(ChildSkill $l)
    {
        if ($this->collFeaturedSkills === null) {
            $this->initFeaturedSkills();
            $this->collFeaturedSkillsPartial = true;
        }

        if (!$this->collFeaturedSkills->contains($l)) {
            $this->doAddFeaturedSkill($l);
        }

        return $this;
    }
1245659
public function setTeam(ChildTeam $v = null)
    {
        if ($v === null) {
            $this->setTeamId(NULL);
        } else {
            $this->setTeamId($v->getId());
        }

        $this->aTeam = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildTeam object, it will not be re-added.
        if ($v !== null) {
            $v->addPersonTeamLink($this);
        }


        return $this;
    }
76987
public function addTeamI18n(ChildTeamI18n $l)
    {
        if ($l && $locale = $l->getLocale()) {
            $this->setLocale($locale);
            $this->currentTranslations[$locale] = $l;
        }
        if ($this->collTeamI18ns === null) {
            $this->initTeamI18ns();
            $this->collTeamI18nsPartial = true;
        }

        if (!in_array($l, $this->collTeamI18ns->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
            $this->doAddTeamI18n($l);
        }

        return $this;
    }
1013065
public function addDealerAdmin(ChildDealerAdmin $l)
    {
        if ($this->collDealerAdmins === null) {
            $this->initDealerAdmins();
            $this->collDealerAdminsPartial = true;
        }

        if (!in_array($l, $this->collDealerAdmins->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
            $this->doAddDealerAdmin($l);
        }

        return $this;
    }
1360361
public function setAncestor(ChildSkill $v = null)
    {
        if ($v === null) {
            $this->setAncestorId(NULL);
        } else {
            $this->setAncestorId($v->getId());
        }

        $this->aAncestor = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildSkill object, it will not be re-added.
        if ($v !== null) {
            $v->addLineageRelatedByAncestorId($this);
        }


        return $this;
    }
204046
public function setMultipleOf(ChildSkill $v = null)
    {
        if ($v === null) {
            $this->setMultipleOfId(NULL);
        } else {
            $this->setMultipleOfId($v->getId());
        }

        $this->aMultipleOf = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildSkill object, it will not be re-added.
        if ($v !== null) {
            $v->addMultiple($this);
        }


        return $this;
    }
1312202
public function addDealerBrand(ChildDealerBrand $l)
    {
        if ($this->collDealerBrands === null) {
            $this->initDealerBrands();
            $this->collDealerBrandsPartial = true;
        }

        if (!in_array($l, $this->collDealerBrands->getArrayCopy(), true)) { // only add it if the **same** object is not already associated
            $this->doAddDealerBrand($l);
        }

        return $this;
    }
73141
public function addMedia(ChildMedia $l)
    {
        if ($this->collMedias === null) {
            $this->initMedias();
            $this->collMediasPartial = true;
        }

        if (!$this->collMedias->contains($l)) {
            $this->doAddMedia($l);

            if ($this->mediasScheduledForDeletion and $this->mediasScheduledForDeletion->contains($l)) {
                $this->mediasScheduledForDeletion->remove($this->mediasScheduledForDeletion->search($l));
            }
        }

        return $this;
    }
155693
public function link($childModel)
    {
        return $this->hasMany(Link::class, 'id_parent')->whereModelParent($this->config->model)->whereModelChild($childModel)->get();
    }
987613
public function setGroup($member_group){
		if(!$this->setModified('group', $member_group)->isModified()){
			return $this;
		}
		$this->group = $member_group;

		return $this;
	}
1085034
public function addSkill(ChildSkill $l)
    {
        if ($this->collSkills === null) {
            $this->initSkills();
            $this->collSkillsPartial = true;
        }

        if (!$this->collSkills->contains($l)) {
            $this->doAddSkill($l);
        }

        return $this;
    }
457703
public function setSkillRelatedByParentId(ChildSkill $v = null)
    {
        if ($v === null) {
            $this->setParentId(NULL);
        } else {
            $this->setParentId($v->getId());
        }

        $this->aSkillRelatedByParentId = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildSkill object, it will not be re-added.
        if ($v !== null) {
            $v->addParent($this);
        }


        return $this;
    }
1093827
public function addM2P(ChildM2P $l)
    {
        if ($this->collM2Ps === null) {
            $this->initM2Ps();
            $this->collM2PsPartial = true;
        }

        if (!$this->collM2Ps->contains($l)) {
            $this->doAddM2P($l);

            if ($this->m2PsScheduledForDeletion and $this->m2PsScheduledForDeletion->contains($l)) {
                $this->m2PsScheduledForDeletion->remove($this->m2PsScheduledForDeletion->search($l));
            }
        }

        return $this;
    }