public function getTeam($teamId)
{
/* @var $team Team */
$team = Team::findOne(array_merge($this->getDefaultCriteria(), [['id' => $teamId]]));
if (empty($team)) {
throw new ApiErrorException(404, ErrorMessage::ERR_OBJECT_NOT_FOUND, "Requested Team either does not exist or is not owned by your account.");
}
return $team;
}