plugin/team/Manager/TeamManager.php
public function unregisterManagersFromTeam(Team $team, array $users)
    {
        $teamManagerRole = $team->getTeamManagerRole();

        if (!is_null($teamManagerRole)) {
            $this->om->startFlushSuite();

            $teamManager = $team->getTeamManager();

            foreach ($users as $user) {
                $this->roleManager->dissociateRole($user, $teamManagerRole);

                if ($teamManager && $teamManager->getid() === $user->getId()) {
                    $team->setTeamManager(null);
                }
            }
            $this->om->persist($team);
            $this->om->endFlushSuite();
        }
    }
public function unregisterManagersFromTeam(Team $team, array $users)
    {
        $teamManagerRole = $team->getTeamManagerRole();

        if (!is_null($teamManagerRole)) {
            $this->om->startFlushSuite();

            $teamManager = $team->getTeamManager();

            foreach ($users as $user) {
                $this->roleManager->dissociateRole($user, $teamManagerRole);

                if ($teamManager && $teamManager->getid() === $user->getId()) {
                    $team->setTeamManager(null);
                }
            }
            $this->om->persist($team);
            $this->om->endFlushSuite();
        }
    }
public function unregisterManagersFromTeam ( Team $ team , array $ users ) { $ teamManagerRole = $ team -> getTeamManagerRole ( ) ; if ( ! is_null ( $ teamManagerRole ) ) { $ this -> om -> startFlushSuite ( ) ; $ teamManager = $ team -> getTeamManager ( ) ; foreach ( $ users as $ user ) { $ this -> roleManager -> dissociateRole ( $ user , $ teamManagerRole ) ; if ( $ teamManager && $ teamManager -> getid ( ) === $ user -> getId ( ) ) { $ team -> setTeamManager ( null ) ; } } $ this -> om -> persist ( $ team ) ; $ this -> om -> endFlushSuite ( ) ; } }
Unregisters team managers.

@param Team  $team
@param array $users
Unregisters team managers .