mirror of
https://git.imnavajas.es/jjimenez/safekat.git
synced 2025-07-25 22:52:08 +00:00
editor form
This commit is contained in:
@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace App\Entities\Wiki;
|
||||
|
||||
use App\Models\Usuarios\UserModel;
|
||||
use CodeIgniter\Entity\Entity;
|
||||
|
||||
class WikiContentEntity extends Entity
|
||||
@ -10,12 +12,24 @@ class WikiContentEntity extends Entity
|
||||
"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;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user