-
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.
Merged branch '1.3' of ezsystems/ezplatform-kernel into 4.6
- Loading branch information
Showing
27 changed files
with
1,177 additions
and
379 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<?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\Event\Mapper; | ||
|
||
use Ibexa\Contracts\Core\Persistence\Content; | ||
use Ibexa\Contracts\Core\Persistence\Content\Field; | ||
use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; | ||
use Symfony\Contracts\EventDispatcher\Event; | ||
|
||
final class ResolveMissingFieldEvent extends Event | ||
{ | ||
private Content $content; | ||
|
||
private FieldDefinition $fieldDefinition; | ||
|
||
private string $languageCode; | ||
|
||
/** @var array<mixed> */ | ||
private array $context; | ||
|
||
private ?Field $field; | ||
|
||
/** | ||
* @param array<mixed> $context | ||
*/ | ||
public function __construct( | ||
Content $content, | ||
FieldDefinition $fieldDefinition, | ||
string $languageCode, | ||
array $context = [] | ||
) { | ||
$this->content = $content; | ||
$this->fieldDefinition = $fieldDefinition; | ||
$this->languageCode = $languageCode; | ||
$this->context = $context; | ||
$this->field = null; | ||
} | ||
|
||
public function getContent(): Content | ||
{ | ||
return $this->content; | ||
} | ||
|
||
public function getFieldDefinition(): FieldDefinition | ||
{ | ||
return $this->fieldDefinition; | ||
} | ||
|
||
public function getLanguageCode(): string | ||
{ | ||
return $this->languageCode; | ||
} | ||
|
||
/** | ||
* @return array<mixed> | ||
*/ | ||
public function getContext(): array | ||
{ | ||
return $this->context; | ||
} | ||
|
||
public function setField(?Field $field): void | ||
{ | ||
$this->field = $field; | ||
} | ||
|
||
public function getField(): ?Field | ||
{ | ||
return $this->field; | ||
} | ||
} |
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,24 @@ | ||
<?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\FieldType; | ||
|
||
use Ibexa\Contracts\Core\Persistence\Content\Field; | ||
use Ibexa\Contracts\Core\Persistence\Content\VersionInfo; | ||
|
||
interface DefaultDataFieldStorage extends FieldStorage | ||
{ | ||
/** | ||
* Populates <code>$field</code> value property with default data based on the external data. | ||
* | ||
* <code>$field->value</code> is a {@see \Ibexa\Contracts\Core\Persistence\Content\FieldValue} object. | ||
* This value holds the data as a {@see \Ibexa\Core\FieldType\Value} based object, according to | ||
* the field type (e.g. for <code>TextLine</code>, it will be a {@see \Ibexa\Core\FieldType\TextLine\Value} object). | ||
*/ | ||
public function getDefaultFieldData(VersionInfo $versionInfo, Field $field): void; | ||
} |
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
Oops, something went wrong.