mirror of
https://github.com/code-rhapsodie/ezdataflow-bundle.git
synced 2026-04-28 00:03:10 +02:00
39 lines
875 B
PHP
39 lines
875 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace CodeRhapsodie\EzDataflowBundle\Model;
|
|
|
|
class ContentUpdateStructure extends ContentStructure
|
|
{
|
|
/** @var int|null */
|
|
protected $id;
|
|
|
|
private function __construct(string $languageCode, array $fields)
|
|
{
|
|
$this->languageCode = $languageCode;
|
|
$this->fields = $fields;
|
|
}
|
|
|
|
public static function createForContentId(int $id, string $languageCode, array $fields): self
|
|
{
|
|
$struct = new self($languageCode, $fields);
|
|
$struct->id = $id;
|
|
|
|
return $struct;
|
|
}
|
|
|
|
public static function createForContentRemoteId(string $remoteId, string $languageCode, array $fields): self
|
|
{
|
|
$struct = new self($languageCode, $fields);
|
|
$struct->remoteId = $remoteId;
|
|
|
|
return $struct;
|
|
}
|
|
|
|
public function getId(): ?int
|
|
{
|
|
return $this->id;
|
|
}
|
|
}
|