Skip to content
PHP Ecosystem
Explore

UserIdentityHero

API reference › Debug Core › Panel › User › UserIdentityHero

final readonly classPHPForge\Debug\Panel\User\UserIdentityHero
Sourcesrc/Panel/User/UserIdentityHero.php

Typed view-model for the user-identity hero card: monogram, name, email, status pill, and id pill.

PropertyTypeDescriptionDefined by
$email readonly constructorstringUser email, or '' when not present on the identity.UserIdentityHero
$idValue readonly constructorstringStringified user id, or '' when not present on the identity.UserIdentityHero
$monogram readonly constructorstringUppercase one-letter monogram for the avatar (for example, A for admin), falling back to ? when neither username nor email is available.UserIdentityHero
$statusLabel readonly constructorstringStatus display label (Active, Banned, Inactive, custom value, or Unknown), or '' when the identity does not carry a status field.UserIdentityHero
$statusVariant readonly constructorstringCSS variant token (success / danger / muted) controlling the status pill tint.UserIdentityHero
$username readonly constructorstringDisplay username; falls back to Unknown user when the identity has no username or name.UserIdentityHero
MethodDescriptionDefined by
__construct()Creates the user-identity hero card data.UserIdentityHero
public readonly string $idValue

Stringified user id, or '' when not present on the identity.

Rendered next to the status pill as ID #<value>.

public function __construct(string $username, string $email, string $idValue, string $monogram, string $statusLabel, string $statusVariant)

Creates the user-identity hero card data.

Parameters

ParameterTypeDescription
$usernamestring
$emailstring
$idValuestring
$monogramstring
$statusLabelstring
$statusVariantstring