Update Models\PM\PPost
Add 'editor' property.
This commit is contained in:
parent
427f2c6587
commit
73bfd6f39e
1 changed files with 7 additions and 0 deletions
|
@ -26,7 +26,9 @@ class PPost extends DataModel
|
|||
|
||||
$this->zDepend = [
|
||||
'id' => ['link', 'user', 'canDelete', 'linkDelete', 'linkEdit', 'linkQuote'],
|
||||
'edited' => ['editor'],
|
||||
'posted' => ['canDelete', 'canEdit'],
|
||||
'poster' => ['editor'],
|
||||
'poster_id' => ['canDelete', 'canEdit'],
|
||||
'topic_id' => ['parent', 'linkQuote'],
|
||||
];
|
||||
|
@ -76,6 +78,11 @@ class PPost extends DataModel
|
|||
return $user;
|
||||
}
|
||||
|
||||
protected function geteditor(): string
|
||||
{
|
||||
return $this->edited > 0 ? $this->poster : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Ссылка на пост
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue