$icon = FontAwesomeIcon::fromValues('bars');
}
- $event = new UserMenuItemIconResolving($this);
- $event->icon = $icon;
+ $event = new UserMenuItemIconResolving($this, $icon);
EventHandler::getInstance()->fire($event);
return $event->icon;
*/
final class UserMenuItemIconResolving implements IEvent
{
- public IFontAwesomeIcon $icon;
-
- public function __construct(public readonly UserMenuItem $userMenuItem)
- {
+ public function __construct(
+ public readonly UserMenuItem $userMenuItem,
+ public IFontAwesomeIcon $icon
+ ) {
}
}