Skip to content

Commit

Permalink
Add getLanguagePermissions
Browse files Browse the repository at this point in the history
  • Loading branch information
martineiber committed Dec 9, 2024
1 parent e81d9cb commit ca754a7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Models/DataObject/DataObjectServiceResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
use Pimcore\Model\DataObject\Concrete;
use Pimcore\Model\DataObject\Folder;
use Pimcore\Model\DataObject\Service;
use Pimcore\Model\UserInterface;
use Pimcore\Model\DataObject\Fieldcollection\Data\AbstractData as FieldCollectionData;
use Pimcore\Model\DataObject\Objectbrick\Data\AbstractData as ObjectBrickData;

/**
* @internal
Expand Down Expand Up @@ -78,4 +81,13 @@ public function getObjectsReferencingUser(int $userId): array
{
return Service::getObjectsReferencingUser($userId);
}

public function getLanguagePermissions(
FieldCollectionData|ObjectBrickData|AbstractObject $object,
UserInterface $user,
string $type
): ?array
{
return Service::getLanguagePermissions($object, $user, $type);
}
}
9 changes: 9 additions & 0 deletions src/Models/DataObject/DataObjectServiceResolverInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
use Pimcore\Model\DataObject\AbstractObject;
use Pimcore\Model\DataObject\ClassDefinition;
use Pimcore\Model\DataObject\Concrete;
use Pimcore\Model\DataObject\Fieldcollection\Data\AbstractData as FieldCollectionData;
use Pimcore\Model\DataObject\Folder;
use Pimcore\Model\DataObject\Objectbrick\Data\AbstractData as ObjectBrickData;
use Pimcore\Model\UserInterface;

/**
* @internal
Expand Down Expand Up @@ -50,4 +53,10 @@ public function enrichLayoutDefinition(
* @return Concrete[]
*/
public function getObjectsReferencingUser(int $userId): array;

public function getLanguagePermissions(
FieldCollectionData|ObjectBrickData|AbstractObject $object,
UserInterface $user,
string $type
): ?array;
}

0 comments on commit ca754a7

Please sign in to comment.