Declares an association between this object and a ChildTeam object.

@param                  ChildTeam $v
@return                 \Team\Model\TeamVersion The current object (for fluent API support)
@throws PropelException
512549
public function setTeam(ChildTeam $v = null)
    {
        if ($v === null) {
            $this->setId(NULL);
        } else {
            $this->setId($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->addTeamVersion($this);
        }


        return $this;
    }
1120112
public function setStructureNodeRelatedByParentId(ChildStructureNode $v = null)
    {
        if ($v === null) {
            $this->setParentId(NULL);
        } else {
            $this->setParentId($v->getId());
        }

        $this->aStructureNodeRelatedByParentId = $v;

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


        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;
    }
53161
public function setVersion($v)
    {
        if ($v !== null) {
            $v = (int) $v;
        }

        if ($this->version !== $v) {
            $this->version = $v;
            $this->modifiedColumns[DealerContactInfoTableMap::VERSION] = true;
        }


        return $this;
    }
622849
public function setPersonTeamLinkIds($v)
    {
        if ($this->person_team_link_ids_unserialized !== $v) {
            $this->person_team_link_ids_unserialized = $v;
            $this->person_team_link_ids = '| ' . implode(' | ', $v) . ' |';
            $this->modifiedColumns[PersonVersionTableMap::PERSON_TEAM_LINK_IDS] = true;
        }


        return $this;
    }
569737
public function setIndexEngineIndex(ChildIndexEngineIndex $v = null)
    {
        if ($v === null) {
            $this->setId(null);
        } else {
            $this->setId($v->getId());
        }

        $this->aIndexEngineIndex = $v;

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

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

        if ($this->team_id_version !== $v) {
            $this->team_id_version = $v;
            $this->modifiedColumns[PersonTeamLinkVersionTableMap::TEAM_ID_VERSION] = true;
        }


        return $this;
    }
133050
public function setFolder(ChildFolder $v = null)
    {
        if ($v === null) {
            $this->setFolderId(NULL);
        } else {
            $this->setFolderId($v->getId());
        }

        $this->aFolder = $v;

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


        return $this;
    }
496957
public function setContent(ChildContent $v = null)
    {
        if ($v === null) {
            $this->setContentId(NULL);
        } else {
            $this->setContentId($v->getId());
        }

        $this->aContent = $v;

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


        return $this;
    }
496440
public function setDealerContact(ChildDealerContact $v = null)
    {
        if ($v === null) {
            $this->setId(NULL);
        } else {
            $this->setId($v->getId());
        }

        $this->aDealerContact = $v;

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


        return $this;
    }
284159
public function setSkillRelatedBySkillId(ChildSkill $v = null)
    {
        if ($v === null) {
            $this->setSkillId(NULL);
        } else {
            $this->setSkillId($v->getId());
        }

        $this->aSkillRelatedBySkillId = $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->addKstrukturRelatedBySkillId($this);
        }


        return $this;
    }
594744
public function setCustomerGroup(ChildCustomerGroup $v = null)
    {
        if ($v === null) {
            $this->setId(NULL);
        } else {
            $this->setId($v->getId());
        }

        $this->aCustomerGroup = $v;

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


        return $this;
    }
766562
public function setSkillRelatedByCompositeId(ChildSkill $v = null)
    {
        if ($v === null) {
            $this->setCompositeId(NULL);
        } else {
            $this->setCompositeId($v->getId());
        }

        $this->aSkillRelatedByCompositeId = $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->addComposite($this);
        }


        return $this;
    }
705368
public function createTeamRole(Team $team, $isManager = false)
    {
        $workspace = $team->getWorkspace();
        $teamName = $team->getName();
        $roleName = $this->computeValidRoleName(
            strtoupper(str_replace(' ', '_', $isManager ? $teamName.'_MANAGER' : $teamName)),
            $workspace->getUuid()
        );
        $roleKey = $this->computeValidRoleTranslationKey($workspace, $isManager ? $teamName.' manager' : $teamName);
        $role = $this->roleManager->createWorkspaceRole($roleName, $roleKey, $workspace);

        $root = $this->resourceManager->getWorkspaceRoot($workspace);
        $this->rightsManager->editPerms(['open' => true], $role, $root);
        $orderedTool = $this->om
            ->getRepository('ClarolineCoreBundle:Tool\OrderedTool')
            ->findOneBy(['workspace' => $workspace, 'name' => 'resource_manager']);

        if (!empty($orderedTool)) {
            $this->toolRightsManager->setToolRights($orderedTool, $role, 1);
        }
        $this->setRightsForOldTeams($workspace, $role);

        return $role;
    }
87689
public function setPersonImage(ChildPersonImage $v = null)
    {
        if ($v === null) {
            $this->setId(NULL);
        } else {
            $this->setId($v->getId());
        }

        $this->aPersonImage = $v;

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


        return $this;
    }
1045405
public function setPerson(ChildPerson $v = null)
    {
        if ($v === null) {
            $this->setId(NULL);
        } else {
            $this->setId($v->getId());
        }

        $this->aPerson = $v;

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


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

        if ($this->team_id !== $v) {
            $this->team_id = $v;
            $this->modifiedColumns[PersonTeamLinkTableMap::TEAM_ID] = true;
        }

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


        return $this;
    }