57 lines
1.1 KiB
PHP
57 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Esun\Translation\Model\StoreView;
|
|
|
|
class LanguageGroup
|
|
{
|
|
/**
|
|
* @param int[] $storeIds
|
|
* @param string[] $storeCodes
|
|
*/
|
|
public function __construct(
|
|
private readonly string $label,
|
|
private readonly string $targetLocale,
|
|
private readonly array $storeIds,
|
|
private readonly array $storeCodes
|
|
) {
|
|
}
|
|
|
|
public function getLabel(): string
|
|
{
|
|
return $this->label;
|
|
}
|
|
|
|
public function getTargetLocale(): string
|
|
{
|
|
return $this->targetLocale;
|
|
}
|
|
|
|
/**
|
|
* @return int[]
|
|
*/
|
|
public function getStoreIds(): array
|
|
{
|
|
return $this->storeIds;
|
|
}
|
|
|
|
/**
|
|
* @return string[]
|
|
*/
|
|
public function getStoreCodes(): array
|
|
{
|
|
return $this->storeCodes;
|
|
}
|
|
|
|
public function toArray(): array
|
|
{
|
|
return [
|
|
'label' => $this->label,
|
|
'target_locale' => $this->targetLocale,
|
|
'store_ids' => $this->storeIds,
|
|
'store_codes' => $this->storeCodes,
|
|
];
|
|
}
|
|
}
|