class RoleExpiresEvent in Role Expire 2.x
Same name and namespace in other branches
- 8 src/Event/RoleExpiresEvent.php \Drupal\role_expire\Event\RoleExpiresEvent
Event that is fired when a user loses one of its roles.
Hierarchy
- class \Drupal\role_expire\Event\RoleExpiresEvent extends \Symfony\Component\EventDispatcher\Event
Expanded class hierarchy of RoleExpiresEvent
See also
1 file declares its use of RoleExpiresEvent
- role_expire.module in ./
role_expire.module - Role Expire module.
File
- src/
Event/ RoleExpiresEvent.php, line 13
Namespace
Drupal\role_expire\EventView source
class RoleExpiresEvent extends Event {
const EVENT_NAME = 'role_expire_event_role_expires';
/**
* The user account.
*
* @var \Drupal\user\UserInterface
*/
public $account;
/**
* The rid of the role which the user has lost.
*
* @var string
*/
public $ridBefore;
/**
* Constructs the object.
*
* @param \Drupal\user\UserInterface $account
* The account of the user logged in.
* @param string $ridBefore
* The role name that has expired.
*/
public function __construct(UserInterface $account, $ridBefore) {
$this->account = $account;
$this->ridBefore = $ridBefore;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RoleExpiresEvent:: |
public | property | The user account. | |
RoleExpiresEvent:: |
public | property | The rid of the role which the user has lost. | |
RoleExpiresEvent:: |
constant | |||
RoleExpiresEvent:: |
public | function | Constructs the object. |