Toggle navigation
Hot Examples
FR
EN
RU
DE
FR
ES
PT
IT
JP
ZH
KO
PHP
PHP
C#
Java
Go
C++
Python
JS
TS
Rechercher
Accueil
FOS
UserBundle
Model
User
hasRole
FOS\UserBundle\Model\User::hasRole PHP Méthode
User Class Documentation
Afficher le fichier
Open project: KnpLabs/KnpUserBundle
hasRole()
public
méthode
Use the SecurityContext, or an implementation of AccessDecisionManager instead, e.g. $securityContext->vote('ROLE_USER');
public
hasRole
(
string
$role
) :
void
$role
string
Résultat
void
public function hasRole($role) { return in_array(strtoupper($role), $this->getRoles(), true); }
User
__construct
__toString
addGroup
addRole
equals
eraseCredentials
generateConfirmationToken
getAlgorithm
getConfirmationToken
getCreatedAt
getEmail
getEmailCanonical
getGroupNames
getGroups
getId
getLastLogin
getPassword
getPasswordRequestedAt
getPlainPassword
getRoles
getSalt
getUpdatedAt
getUsername
getUsernameCanonical
hasGroup
hasRole
incrementCreatedAt
incrementUpdatedAt
isAccountNonExpired
isAccountNonLocked
isCredentialsExpired
isCredentialsNonExpired
isEnabled
isExpired
isLocked
isPasswordRequestNonExpired
isSuperAdmin
isUser
removeGroup
removeRole
setAlgorithm
setConfirmationToken
setCredentialsExpireAt
setCredentialsExpired
setEmail
setEmailCanonical
setEnabled
setExpired
setExpiresAt
setLastLogin
setLocked
setPassword
setPasswordRequestedAt
setPlainPassword
setRoles
setSuperAdmin
setUsername
setUsernameCanonical