Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/4.6'
Browse files Browse the repository at this point in the history
  • Loading branch information
tischsoic committed Apr 10, 2024
2 parents 82540f6 + 00e8a3f commit bde3538
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
10 changes: 9 additions & 1 deletion src/contracts/Repository/Values/Content/VersionInfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ abstract class VersionInfo extends ValueObject implements MultiLanguageName
*
* @var string[]
*/
protected $languageCodes = [];
protected array $languageCodes = [];

/**
* Content of the content this version belongs to.
Expand All @@ -107,6 +107,14 @@ abstract public function getInitialLanguage(): Language;
*/
abstract public function getLanguages(): iterable;

/**
* @return array<string>
*/
public function getLanguageCodes(): array
{
return $this->languageCodes;
}

/**
* Returns true if version is a draft.
*
Expand Down
28 changes: 24 additions & 4 deletions src/contracts/Repository/Values/User/LookupLimitationResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@
final class LookupLimitationResult extends ValueObject
{
/** @var bool */
protected $hasAccess;
protected bool $hasAccess;

/** @var \Ibexa\Contracts\Core\Repository\Values\User\Limitation[] */
protected $roleLimitations;
protected array $roleLimitations;

/** @var \Ibexa\Contracts\Core\Repository\Values\User\LookupPolicyLimitations[] */
protected $lookupPolicyLimitations;
protected array $lookupPolicyLimitations;

/**
* @param bool $hasAccess
* @param \Ibexa\Contracts\Core\Repository\Values\User\Limitation[] $roleLimitations
* @param \Ibexa\Contracts\Core\Repository\Values\User\LookupPolicyLimitations[] $lookupPolicyLimitations
*/
Expand All @@ -40,6 +39,27 @@ public function __construct(
$this->lookupPolicyLimitations = $lookupPolicyLimitations;
$this->roleLimitations = $roleLimitations;
}

public function hasAccess(): bool
{
return $this->hasAccess;
}

/**
* @return \Ibexa\Contracts\Core\Repository\Values\User\Limitation[]
*/
public function getRoleLimitations(): array
{
return $this->roleLimitations;
}

/**
* @return \Ibexa\Contracts\Core\Repository\Values\User\LookupPolicyLimitations[]
*/
public function getLookupPolicyLimitations(): array
{
return $this->lookupPolicyLimitations;
}
}

class_alias(LookupLimitationResult::class, 'eZ\Publish\API\Repository\Values\User\LookupLimitationResult');

0 comments on commit bde3538

Please sign in to comment.