final class UserFormatNameAlterEvent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/user_event_dispatcher/src/Event/User/UserFormatNameAlterEvent.php \Drupal\user_event_dispatcher\Event\User\UserFormatNameAlterEvent
Class UserFormatNameAlterEvent.
Hierarchy
- class \Drupal\user_event_dispatcher\Event\User\UserFormatNameAlterEvent extends \Symfony\Component\EventDispatcher\Event implements EventInterface
Expanded class hierarchy of UserFormatNameAlterEvent
2 files declare their use of UserFormatNameAlterEvent
- UserEventTest.php in modules/
user_event_dispatcher/ tests/ src/ Unit/ User/ UserEventTest.php - user_event_dispatcher.module in modules/
user_event_dispatcher/ user_event_dispatcher.module - User event dispatcher submodule.
File
- modules/
user_event_dispatcher/ src/ Event/ User/ UserFormatNameAlterEvent.php, line 13
Namespace
Drupal\user_event_dispatcher\Event\UserView source
final class UserFormatNameAlterEvent extends Event implements EventInterface {
/**
* Name.
*
* @var string
*/
private $name;
/**
* Account.
*
* @var \Drupal\Core\Session\AccountInterface
*/
private $account;
/**
* UserFormatNameAlterEvent constructor.
*
* @param string|\Drupal\Component\Render\MarkupInterface $name
* Name.
* @param \Drupal\Core\Session\AccountInterface $account
* Account.
*/
public function __construct(&$name, AccountInterface $account) {
$this->name =& $name;
$this->account = $account;
}
/**
* Get the name by reference.
*
* @return string
* Name.
*/
public function &getName() : string {
return $this->name;
}
/**
* Get the account.
*
* @return \Drupal\Core\Session\AccountInterface
* Account.
*/
public function getAccount() : AccountInterface {
return $this->account;
}
/**
* Get the dispatcher type.
*
* @return string
* The dispatcher type.
*/
public function getDispatcherType() : string {
return HookEventDispatcherInterface::USER_FORMAT_NAME_ALTER;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
UserFormatNameAlterEvent:: |
private | property | Account. | |
UserFormatNameAlterEvent:: |
private | property | Name. | |
UserFormatNameAlterEvent:: |
public | function | Get the account. | |
UserFormatNameAlterEvent:: |
public | function |
Get the dispatcher type. Overrides EventInterface:: |
|
UserFormatNameAlterEvent:: |
public | function | Get the name by reference. | |
UserFormatNameAlterEvent:: |
public | function | UserFormatNameAlterEvent constructor. |