public function userCanSwitch(AccountInterface $account, $site, $state)
    {
        $allowed = $this->getAllowedTransitions($account, $site);

        return isset($allowed[$state]);
    }
public function userCanSwitch(AccountInterface $account, $site, $state)
    {
        $allowed = $this->getAllowedTransitions($account, $site);

        return isset($allowed[$state]);
    }
public function userCanSwitch ( AccountInterface $ account , $ site , $ state ) { $ allowed = $ this -> getAllowedTransitions ( $ account , $ site ) ; return isset ( $ allowed [ $ state ] ) ; }
Can the given user switch the given site to the given state

@param AccountInterface $account
@param Site $site
@param int $state

@return boolean
Can the given user switch the given site to the given state