Creates a new Team for the current Account

@param  Team $team
@return Team
@throws BaseException
557711
public function createTeam(Team $team)
    {
        $response = $this->rest->post(
            static::TEAM_CREATE_PATH,
            $team->toCreateParams()
        );

        $this->checkResponse($response);

        return $team->fromResponse($response);
    }
39667
public static function factory($accessToken, $currentTeam)
    {
        $client = Client::factory($accessToken);

        return new self($client, $currentTeam);
    }
1172577
public function team($teamId)
	{
		$team = $this->info['teams'];
		if (isset($team[$teamId]))
		{
			return $team[$teamId];
		}

		return null;
	}
143506
public function transform(Team $team)
    {
        return [
            'captainName' => "{$team->user->name}",
            'captainId' => $team->user_id,
            'country' => $team->country,
            'createdAt' => $team->created_at->toW3cString(),
            'id' => $team->id,
            'name' => $team->name,
            'timezone' => $team->timezone,
            'updatedAt' => $team->updated_at->toW3cString(),
        ];
    }
944972
public function prune($team = null)
    {
        if ($team) {
            $this->addUsingAlias(TeamTableMap::ID, $team->getId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }
1244253
public function renameTeam($teamUuid, $name)
    {
        $options = [
            'form_params' => [
                'name' => $name,
            ],
        ];

        return new OperationResponse(
            $this->connector->request('put', "/teams/${teamUuid}", $options)
        );
    }
572500
public Team createTeam(String teamName) throws HelloSignException {
        return new Team(
                httpClient.withAuth(auth).withPostField(Team.TEAM_NAME, teamName).post(BASE_URI + TEAM_URI).asJson());
    }
280853
public function score($team, $points = 1)
    {
        if (isset($this->teams[$team])) {
            $this->teams[$team]->updateScore($points);
        }

        $this->drawScoreboard();
        $this->drawRainbow();
        $this->drawCat($team);
    }
868497
def create(
            self, request, parent_lookup_seedteam=None,
            parent_lookup_seedteam__organization=None):
        ''''''
        team = self.check_team_permissions(
            request, parent_lookup_seedteam,
            parent_lookup_seedteam__organization)

        serializer = self.get_serializer(data=request.data)
        serializer.is_valid(raise_exception=True)
        permission = team.permissions.create(**serializer.validated_data)
        serializer = self.get_serializer(instance=permission)
        return Response(serializer.data, status=status.HTTP_201_CREATED)
1022586
public function createTeam($organizationUuid, $name)
    {
        $options = [
            'form_params' => [
                'name' => $name,
            ],
        ];

        return new OperationResponse(
            $this->connector->request('post', "/organizations/${organizationUuid}/teams", $this->query, $options)
        );
    }
818992
public static function hydrate(stdClass $team)
    {
        $hydrated = new TeamEntity();

        if (isset($team->id)) {
            $hydrated->setId($team->id);
        }

        if (isset($team->name)) {
            $hydrated->setName($team->name);
        }

        if (isset($team->organization)) {
            $hydrated->setOrganization(OrgHydrator::hydrate($team->organization));
        }

        if (isset($team->users) && is_array($team->users)) {
            $hydrated->setUsers(UserHydrator::hydrateCollection($team->users));
        }

        if (isset($team->created_by)) {
            $hydrated->setCreatedBy(UserHydrator::hydrate($team->created_by));
        }

        if (isset($team->created_at)) {
            $hydrated->setCreatedAt(new DateTime($team->created_at));
        }

        return $hydrated;
    }
992537
public function attachPermissions($permissions = [], $team = null)
    {
        foreach ($permissions as $permission) {
            $this->attachPermission($permission, $team);
        }

        return $this;
    }
231653
public function deleteTeams(array $teams)
    {
        $this->om->startFlushSuite();

        foreach ($teams as $team) {
            $this->deleteTeam($team);
        }

        $this->om->endFlushSuite();
    }
1307820
public function update($teamId, TeamBuilder $input, array $queryParams = [])
    {
        $response = $this->api->teams()->update($teamId, $input->toArray(), $queryParams);

        return new TeamResponse($response);
    }
642605
public function getTeamDrop(Dropzone $dropzone, Team $team, User $user, $withCreation = false)
    {
        $drop = $this->dropRepo->findOneBy(['dropzone' => $dropzone, 'teamUuid' => $team->getUuid()]);

        if ($withCreation) {
            if (empty($drop)) {
                $this->om->startFlushSuite();
                $drop = new Drop();
                $drop->setUser($user);
                $drop->setDropzone($dropzone);
                $drop->setTeamId($team->getId());
                $drop->setTeamUuid($team->getUuid());
                $drop->setTeamName($team->getName());

                foreach ($team->getRole()->getUsers() as $teamUser) {
                    $drop->addUser($teamUser);
                    /* TODO: checks that a valid status is not overwritten */
                    $this->resourceEvalManager->createResourceEvaluation(
                        $dropzone->getResourceNode(),
                        $teamUser,
                        null,
                        ['status' => AbstractResourceEvaluation::STATUS_INCOMPLETE]
                    );
                }
                $this->om->persist($drop);
                $this->om->endFlushSuite();

                $this->eventDispatcher->dispatch('log', new LogDropStartEvent($dropzone, $drop));
            } elseif (!$drop->hasUser($user)) {
                $this->om->startFlushSuite();
                $drop->addUser($user);
                $this->resourceEvalManager->createResourceEvaluation(
                    $dropzone->getResourceNode(),
                    $user,
                    null,
                    ['status' => AbstractResourceEvaluation::STATUS_INCOMPLETE]
                );
                $this->om->persist($drop);
                $this->om->endFlushSuite();
            }
        }

        return $drop;
    }
108849
public function show(TeamRequest $request, Team $team)
    {

        if ($team->exists) {
            $view = 'team::team.show';
        } else {
            $view = 'team::team.new';
        }

        return $this->response->title(trans('app.view') . ' ' . trans('team::team.name'))
            ->data(compact('team'))
            ->view($view, true)
            ->output();
    }
20250
public function deleteById($teamId, array $queryParams = [])
    {
        $response = $this->api->teams()->deleteById($teamId, $queryParams);

        return new BaseResponse($response);
    }