Get Team For Logged In User
To get the team for the logged in user you can use the CurrentTeamProvider
.
use Parthenon\User\Team\CurrentTeamProviderInterface;
class ExampleController
{
public function action(CurrentTeamProviderInterface $currentTeamProvider)
{
$team = $currentTeamProvider->getCurrentTeam();
return new Response('hello world');
}
}