# UserRbacRow

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

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [Panel](/docs/extensions/debug-core/reference/panel/index.md) › [User](/docs/extensions/debug-core/reference/panel/user/index.md) › UserRbacRow

| final readonly class | `PHPForge\Debug\Panel\User\UserRbacRow` |
| --- | --- |
| Source | [`src/Panel/User/UserRbacRow.php`](https://github.com/php-forge/debug-core/blob/main/src/Panel/User/UserRbacRow.php#L12) |

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

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-createdAt"></span>`$createdAt` readonly constructor | `int\|null` | UNIX timestamp of item creation, or `null` when not recorded. | `UserRbacRow` |
| <span id="property-data"></span>`$data` readonly constructor | `string` | Serialized arbitrary data attached to the item, or an empty string when absent. | `UserRbacRow` |
| <span id="property-description"></span>`$description` readonly constructor | `string` | Human-readable description of the item's purpose. | `UserRbacRow` |
| <span id="property-name"></span>`$name` readonly constructor | `string` | Item name, unique within the hierarchy. | `UserRbacRow` |
| <span id="property-ruleName"></span>`$ruleName` readonly constructor | `string` | Name of the rule associated with the item, or an empty string when none. | `UserRbacRow` |
| <span id="property-updatedAt"></span>`$updatedAt` readonly constructor | `int\|null` | UNIX timestamp of the last item update, or `null` when not recorded. | `UserRbacRow` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Creates a User panel role or permission row. | `UserRbacRow` |
| [`fromArray()`](#method-fromArray) static | Builds a row from the normalized array shape produced by RBAC adapters. | `UserRbacRow` |

## Method details

### __construct() <span id="method-__construct"></span>

```php
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**

| Parameter | Type | Description |
| --- | --- | --- |
| `$name` | `string` | Item name, unique within the hierarchy. |
| `$description` | `string` | Human-readable description of the item's purpose. |
| `$ruleName` | `string` | Name of the rule associated with the item, or an empty string when none. |
| `$data` | `string` | Serialized arbitrary data attached to the item, or an empty string when absent. |
| `$createdAt` | `int\|null` | UNIX timestamp of item creation, or `null` when not recorded. |
| `$updatedAt` | `int\|null` | UNIX timestamp of the last item update, or `null` when not recorded. |

### fromArray() <span id="method-fromArray"></span>

```php
public static function fromArray(array<array-key, mixed> $row): self
```

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

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$row` | `array<array-key, mixed>` | Associative array with keys `name`, `description`, `ruleName`, `data`, `createdAt`, and `updatedAt`. |

**Returns**

`self`