core-bundle/src/Security/Voter/BackendAccessVoter.php
protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool
    {
        $user = $token->getUser();
        [, $field] = explode('.', $attribute, 2);

        if (!$user instanceof BackendUser || (!is_scalar($subject) && !\is_array($subject))) {
            return false;
        }

        return $user->hasAccess($subject, $field);
    }
protected function voteOnAttribute($attribute, $subject, TokenInterface $token): bool
    {
        $user = $token->getUser();
        [, $field] = explode('.', $attribute, 2);

        if (!$user instanceof BackendUser || (!is_scalar($subject) && !\is_array($subject))) {
            return false;
        }

        return $user->hasAccess($subject, $field);
    }
protected function voteOnAttribute ( $ attribute , $ subject , TokenInterface $ token ) : bool { $ user = $ token -> getUser ( ) ; [ , $ field ] = explode ( '.' , $ attribute , 2 ) ; if ( ! $ user instanceof BackendUser || ( ! is_scalar ( $ subject ) && ! \ is_array ( $ subject ) ) ) { return false ; } return $ user -> hasAccess ( $ subject , $ field ) ; }
{@inheritdoc}
{