-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added missing LoadContentEvent after loadContent
- Loading branch information
1 parent
63485b4
commit 9cb856b
Showing
4 changed files
with
88 additions
and
16 deletions.
There are no files selected for viewing
71 changes: 71 additions & 0 deletions
71
src/contracts/Repository/Events/Content/LoadContentEvent.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
|
||
/** | ||
* @copyright Copyright (C) Ibexa AS. All rights reserved. | ||
* @license For full copyright and license information view LICENSE file distributed with this source code. | ||
*/ | ||
declare(strict_types=1); | ||
|
||
namespace Ibexa\Contracts\Core\Repository\Events\Content; | ||
|
||
use Ibexa\Contracts\Core\Repository\Event\AfterEvent; | ||
use Ibexa\Contracts\Core\Repository\Values\Content\Content; | ||
|
||
final class LoadContentEvent extends AfterEvent | ||
{ | ||
private int $contentId; | ||
|
||
private Content $content; | ||
|
||
/** @var string[]|null */ | ||
private ?array $languages; | ||
|
||
private ?int $versionNo; | ||
|
||
private bool $useAlwaysAvailable; | ||
|
||
/** | ||
* @param string[] $languages | ||
*/ | ||
public function __construct( | ||
Content $content, | ||
int $contentId, | ||
array $languages = null, | ||
?int $versionNo = null, | ||
bool $useAlwaysAvailable = true | ||
) { | ||
$this->contentId = $contentId; | ||
$this->content = $content; | ||
$this->languages = $languages; | ||
$this->versionNo = $versionNo; | ||
$this->useAlwaysAvailable = $useAlwaysAvailable; | ||
} | ||
|
||
public function getContent(): Content | ||
{ | ||
return $this->content; | ||
} | ||
|
||
/** | ||
* @return string[]|null | ||
*/ | ||
public function getLanguages(): ?array | ||
{ | ||
return $this->languages; | ||
} | ||
|
||
public function getVersionNo(): ?int | ||
{ | ||
return $this->versionNo; | ||
} | ||
|
||
public function getUseAlwaysAvailable(): bool | ||
{ | ||
return $this->useAlwaysAvailable; | ||
} | ||
|
||
public function getContentId(): int | ||
{ | ||
return $this->contentId; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters