Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ResourceBundle] fix CoreShopRelation and CoreShopRelations dynamic classes setter #2396

Merged
merged 1 commit into from
Oct 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@
class CoreShopRelation extends Data\ManyToOneRelation
{
public string|null $stack = null;

public bool $returnConcrete = false;
public bool $objectsAllowed = true;
public array $classes = [];

public function getFieldType(): string
{
Expand Down Expand Up @@ -106,28 +107,13 @@ public function setClasses(array $classes): static
return $this;
}

public function getObjectsAllowed(): bool
{
return true;
}

public function getDocumentsAllowed(): bool
public static function __set_state(array $data): static
{
return false;
}
$obj = parent::__set_state($data);
$obj->classes = $obj->getClasses();
$obj->objectsAllowed = true;

public function getDocumentTypes(): array
{
return [];
}

public function getAssetsAllowed(): bool
{
return false;
}

public function getAssetTypes(): array
{
return [];
return $obj;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
class CoreShopRelations extends Data\ManyToManyRelation
{
public string|null $stack;
public bool $objectsAllowed = true;
public array $classes = [];

public function getFieldType(): string
{
Expand Down Expand Up @@ -102,28 +104,12 @@ public function getClasses(): array
return $return;
}

public function getObjectsAllowed(): bool
public static function __set_state(array $data): static
{
return true;
}

public function getDocumentsAllowed(): bool
{
return false;
}
$obj = parent::__set_state($data);
$obj->classes = $obj->getClasses();
$obj->objectsAllowed = true;

public function getDocumentTypes(): array
{
return [];
}

public function getAssetsAllowed(): bool
{
return false;
}

public function getAssetTypes(): array
{
return [];
return $obj;
}
}