Roll backup project user include
This commit is contained in:
parent
2899d5fce2
commit
c0e7c399fb
|
|
@ -41,20 +41,8 @@ class ProjectTransformer extends EntityTransformer
|
||||||
'invoices',
|
'invoices',
|
||||||
'expenses',
|
'expenses',
|
||||||
'quotes',
|
'quotes',
|
||||||
'user',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
public function includeUser(Project $project): ?Item
|
|
||||||
{
|
|
||||||
$transformer = new UserTransformer($this->serializer);
|
|
||||||
|
|
||||||
if (!$project->user) { //@phpstan-ignore-line
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $this->includeItem($project->user, $transformer, User::class);
|
|
||||||
}
|
|
||||||
|
|
||||||
public function includeDocuments(Project $project)
|
public function includeDocuments(Project $project)
|
||||||
{
|
{
|
||||||
$transformer = new DocumentTransformer($this->serializer);
|
$transformer = new DocumentTransformer($this->serializer);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue