|  | 
| 21 | 21 | use Pimcore\Model\DataObject\ClassDefinition\Data; | 
| 22 | 22 | use Pimcore\Model\DataObject\Concrete; | 
| 23 | 23 | use Pimcore\Model\DataObject\Service; | 
|  | 24 | +use Pimcore\Model\User; | 
| 24 | 25 | 
 | 
| 25 | 26 | /** | 
| 26 | 27 |  * @internal | 
| 27 | 28 |  */ | 
| 28 | 29 | final class DataObjectServiceResolver extends DataObjectServiceResolverContract implements DataObjectServiceResolverInterface | 
| 29 | 30 | { | 
| 30 |  | -    public function getCustomLayoutDefinitionForGridColumnConfig(ClassDefinition $class, int $objectId): array | 
| 31 |  | -    { | 
| 32 |  | -        return Service::getCustomLayoutDefinitionForGridColumnConfig($class, $objectId); | 
|  | 31 | +    public function getCustomLayoutDefinitionForGridColumnConfig( | 
|  | 32 | +        ClassDefinition $class, | 
|  | 33 | +        int $objectId, | 
|  | 34 | +        ?User $user = null | 
|  | 35 | +    ): array { | 
|  | 36 | +        return Service::getCustomLayoutDefinitionForGridColumnConfig($class, $objectId, $user); | 
| 33 | 37 |     } | 
| 34 | 38 | 
 | 
| 35 | 39 |     public function enrichLayoutDefinition( | 
| 36 | 40 |         ClassDefinition\Data|ClassDefinition\Layout|null &$layout, | 
| 37 | 41 |         ?Concrete $object = null, | 
| 38 |  | -        array $context = [] | 
|  | 42 | +        array $context = [], | 
|  | 43 | +        ?User $user = null | 
| 39 | 44 |     ): void { | 
| 40 |  | -        Service::enrichLayoutDefinition($layout, $object, $context); | 
|  | 45 | +        Service::enrichLayoutDefinition($layout, $object, $context, $user); | 
| 41 | 46 |     } | 
| 42 | 47 | 
 | 
| 43 |  | -    public function enrichLayoutPermissions(Data &$layout, ?array $allowedView, ?array $allowedEdit): void | 
| 44 |  | -    { | 
| 45 |  | -        Service::enrichLayoutPermissions($layout, $allowedView, $allowedEdit); | 
|  | 48 | +    public function enrichLayoutPermissions( | 
|  | 49 | +        Data &$layout, | 
|  | 50 | +        ?array $allowedView, | 
|  | 51 | +        ?array $allowedEdit, | 
|  | 52 | +        ?User $user = null | 
|  | 53 | +    ): void { | 
|  | 54 | +        Service::enrichLayoutPermissions($layout, $allowedView, $allowedEdit, $user); | 
| 46 | 55 |     } | 
| 47 | 56 | } | 
0 commit comments