Draws the cat for the current iteration.

@param string $team The name of the team that has scored for this iteration.
483950
protected function drawCat($team)
    {
        $cat = $this->cat->next(
            isset($this->teams[$team]) ? $this->teams[$team]->getEye() : '-'
        );

        $width = $this->width + $this->rainbow->getWidth();
        $size = $this->cat->getHeight();

        $this->preamble($size);

        foreach ($cat as $line) {
            $this->write(self::ESC . $width . 'C');
            $this->write($line);
            $this->write("\n");
        }

        $this->postamble($size);
    }
317986
public function hasMemberOnTeam($teamId)
    {
        /** @noinspection PhpUndefinedMethodInspection */
        $membersOnTeam = $this->members->filter(function ($member) use ($teamId) {
            return ($member->team_id === $teamId) && ($member->status !== "Invited");
        });
        /** @noinspection PhpUndefinedMethodInspection */
        return $membersOnTeam->count() > 0;
    }
1232313
def team_players(self, team):
        """"""
        headers = ['Jersey Number', 'Name', 'Position', 'Nationality',
                   'Date of Birth']
        result = [headers]

        result.extend([player['shirtNumber'],
                       player['name'],
                       player['position'],
                       player['nationality'],
                       player['dateOfBirth']]
                      for player in team)
        self.generate_output(result)
458275
public function update(TeamRequest $request, Team $team)
    {
        try {
            $attributes = $request->all();

            $team->update($attributes);
            return $this->response->message(trans('messages.success.updated', ['Module' => trans('team::team.name')]))
                ->code(204)
                ->status('success')
                ->url(guard_url('team/team/' . $team->getRouteKey()))
                ->redirect();
        } catch (Exception $e) {
            return $this->response->message($e->getMessage())
                ->code(400)
                ->status('error')
                ->url(guard_url('team/team/' . $team->getRouteKey()))
                ->redirect();
        }

    }
925377
public function registerManagersToTeam(Team $team, array $users)
    {
        $teamManagerRole = $team->getTeamManagerRole();

        if (!is_null($teamManagerRole) && 0 < count($users)) {
            $this->om->startFlushSuite();

            $team->setTeamManager($users[0]);

            foreach ($users as $user) {
                $this->roleManager->associateRole($user, $teamManagerRole);
            }
            $this->om->persist($team);
            $this->om->endFlushSuite();
        }
    }
108511
public function majRankCup()
    {
        $this->majGameRank();
        $teams = $this->findBy(array(), array('gameRank0' => 'DESC', 'gameRank1' => 'DESC', 'gameRank2' => 'DESC', 'gameRank3' => 'DESC'));

        $list = array();
        foreach ($teams as $team) {
            $list[] = $team;
        }

        Ranking::addObjectRank($list, 'rankCup', array('gameRank0', 'gameRank1', 'gameRank2', 'gameRank3'));
        $this->getEntityManager()->flush();
    }
1001855
public function userTeamIndexAction(Team $team, User $currentUser)
    {
        $workspace = $team->getWorkspace();
        $this->checkToolAccess($workspace);
        $isTeamMember = $this->isTeamMember($team, $currentUser);
        $isTeamManager = $this->isTeamManager($team, $currentUser);

        if (!$isTeamMember && !$isTeamManager) {

            throw new AccessDeniedException();
        }
        $users = $team->getUsers();
        $params = $this->teamManager->getParametersByWorkspace($workspace);

        return array(
            'workspace' => $workspace,
            'currentUser' => $currentUser,
            'users' => $users,
            'team' => $team,
            'params' => $params,
            'isTeamMember' => $isTeamMember,
            'isTeamManager' => $isTeamManager
        );
    }
630208
public function teamUserslistAction(Team $team)
    {
        $this->checkToolAccess($team->getWorkspace());

        $users = $team->getUsers();

        return array('team' => $team, 'users' => $users);
    }
1179329
public function draw(array $data)
    {
        $lengths = $this->calcLength($data);

        $this->writeHeaders($lengths);

        $this->writeData($data, $lengths);

        $this->writeFooter($lengths);
    }
809415
public function draw($name)
    {
        $this->bstall->load($name);
        
        $pixels = Input::get('pixels');
        foreach($pixels as $p) {
            if(isset($p['x']) 
            && isset($p['y']) 
            && isset($p['c'])) {
                $this->bstall->write($p['x'], $p['y'], $p['c']);
            }
        }
        
        $this->bstall->save($name);

        return Response::json(["success" => true]);
    }
1295786
public function teamsFillAction(Request $request)
    {
        $teams = parent::decodeIdsString($request, 'Claroline\TeamBundle\Entity\Team');
        $workspace = 0 < count($teams) ? $teams[0]->getWorkspace() : null;

        if ($workspace) {
            foreach ($teams as $team) {
                if ($workspace->getId() !== $team->getWorkspace()->getId()) {
                    throw new AccessDeniedException();
                }
            }
        } else {
            throw new AccessDeniedException();
        }
        $this->checkToolAccess($workspace, 'edit');
        $this->teamManager->fillTeams($workspace, $teams);

        return new JsonResponse(null, 204);
    }
276222
public static function fetchTeam($team = null)
    {
        if (is_null($team) || !Config::get('laratrust.use_teams')) {
            return null;
        }

        return static::getIdFor($team, 'team');
    }
1343712
function forcePlayerTeam($player, $team, $multicall = false)
    {
        $login = $this->getLogin($player);
        if ($login === false) {
            throw new InvalidArgumentException('player = ' . print_r($player, true));
        }
        if ($team !== 0 && $team !== 1) {
            throw new InvalidArgumentException('team = ' . print_r($team, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($login, $team), $multicall);
    }
911632
protected function drawDash($text = '', $text_first = false, $align = 'R')
    {
        $cell = function ($text, $align) {
            $this->Cell(177, 4, $text, 0, 1, $align);
        };

        if ($text_first) {
            $cell($text, $align);
        }

        $this->SetLineWidth(static::DEFAULT_LINE_WIDTH * 0.625);
        $y = $this->GetY();
        $this->SetDash(...static::DASH_STYLE);
        $this->Line(10, $y, 187, $y);
        $this->SetDash();
        $this->SetLineWidth(static::DEFAULT_LINE_WIDTH);

        if (!$text_first) {
            $cell($text, $align);
        }
    }
581622
public function search(Request $request)
    {
        $teams = $this->service->search($request->user()->id, $request->search);
        return view('team.index')->with('teams', $teams);
    }
1028226
public function show($id)
    {
        /** @noinspection PhpUndefinedMethodInspection */
        $team = Team::with('user')
            ->findOrFail($id);
        $this->authorize('view', $team);
        return fractal($team, new TeamTransformer())
            ->withResourceName('team')
            ->respond();
    }
667224
function setForcedClubLinks($team1, $team2, $multicall = false)
    {
        if (!is_string($team1)) {
            throw new InvalidArgumentException('team1 = ' . print_r($team1, true));
        }
        if (!is_string($team2)) {
            throw new InvalidArgumentException('team2 = ' . print_r($team2, true));
        }

        return $this->execute(ucfirst(__FUNCTION__), array($team1, $team2), $multicall);
    }