2020-12-28 19:47:08 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Transformers\Api\Application;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\AdminRole;
|
2021-08-07 20:25:06 +00:00
|
|
|
use Pterodactyl\Transformers\Api\Transformer;
|
2020-12-28 19:47:08 +00:00
|
|
|
|
2021-08-07 20:25:06 +00:00
|
|
|
class AdminRoleTransformer extends Transformer
|
2020-12-28 19:47:08 +00:00
|
|
|
{
|
|
|
|
public function getResourceName(): string
|
|
|
|
{
|
|
|
|
return AdminRole::RESOURCE_NAME;
|
|
|
|
}
|
|
|
|
|
2021-01-01 22:55:30 +00:00
|
|
|
public function transform(AdminRole $model): array
|
2020-12-28 19:47:08 +00:00
|
|
|
{
|
|
|
|
return [
|
2021-01-01 22:55:30 +00:00
|
|
|
'id' => $model->id,
|
|
|
|
'name' => $model->name,
|
|
|
|
'description' => $model->description,
|
2020-12-28 19:47:08 +00:00
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|