Skip to content
PHP Ecosystem
Explore

UserRbacRow

API reference › Debug Core › Panel › User › UserRbacRow

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

Represents one RBAC item row (role or permission) in the User panel detail view.

PropertyTypeDescriptionDefined by
$createdAt readonly constructorint|nullUNIX timestamp of item creation, or null when not recorded.UserRbacRow
$data readonly constructorstringSerialized arbitrary data attached to the item, or an empty string when absent.UserRbacRow
$description readonly constructorstringHuman-readable description of the item’s purpose.UserRbacRow
$name readonly constructorstringItem name, unique within the hierarchy.UserRbacRow
$ruleName readonly constructorstringName of the rule associated with the item, or an empty string when none.UserRbacRow
$updatedAt readonly constructorint|nullUNIX timestamp of the last item update, or null when not recorded.UserRbacRow
MethodDescriptionDefined by
__construct()Creates a User panel role or permission row.UserRbacRow
fromArray() staticBuilds a row from the normalized array shape produced by RBAC adapters.UserRbacRow
public function __construct(string $name, string $description, string $ruleName, string $data, int|null $createdAt, int|null $updatedAt)

Creates a User panel role or permission row.

Parameters

ParameterTypeDescription
$namestringItem name, unique within the hierarchy.
$descriptionstringHuman-readable description of the item’s purpose.
$ruleNamestringName of the rule associated with the item, or an empty string when none.
$datastringSerialized arbitrary data attached to the item, or an empty string when absent.
$createdAtint|nullUNIX timestamp of item creation, or null when not recorded.
$updatedAtint|nullUNIX timestamp of the last item update, or null when not recorded.
public static function fromArray(array<array-key, mixed> $row): self

Builds a row from the normalized array shape produced by RBAC adapters.

Parameters

ParameterTypeDescription
$rowarray<array-key, mixed>Associative array with keys name, description, ruleName, data, createdAt, and updatedAt.

Returns

self