mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
36 lines
872 B
PHP
Executable File
36 lines
872 B
PHP
Executable File
<?php
|
|
|
|
namespace App\Entities\Wiki;
|
|
|
|
use App\Models\Usuarios\UserModel;
|
|
use CodeIgniter\Entity\Entity;
|
|
|
|
class WikiContentEntity extends Entity
|
|
{
|
|
protected $attributes = [
|
|
"locale" => null,
|
|
"page_id" => null,
|
|
"editor_data" => null,
|
|
"published_data" => null,
|
|
"last_edit_by" => null,
|
|
"published_by" => null,
|
|
"published_at" => null,
|
|
];
|
|
protected $casts = [
|
|
"locale" => "string",
|
|
"page_id" => "int",
|
|
"editor_data" => "string",
|
|
"published_data" => "string",
|
|
"last_edit_by" => "int",
|
|
"published_by" => "int",
|
|
"published_at" => "string",
|
|
];
|
|
public function publish_by() : string
|
|
{
|
|
$m = model(UserModel::class);
|
|
$user = $m->find($this->attributes['published_by']);
|
|
return $user->first_name." ".$user->last_name;
|
|
}
|
|
|
|
}
|