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

IBX-7911: Replaced usage of magic getters for load subtree code paths #76

Merged
merged 3 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 2 additions & 2 deletions src/lib/Strategy/DefaultThumbnailStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ private function getInitials(array $fields): string
foreach ($this->initialsFieldDefIdentifiers as $identifier) {
/** @var \Ibexa\Contracts\Core\Repository\Values\Content\Field $field */
foreach ($fields as $field) {
if ($field->fieldDefIdentifier === $identifier) {
$initials .= substr((string)$field->value, 0, 1);
if ($field->getFieldDefinitionIdentifier() === $identifier) {
$initials .= substr((string)$field->getValue(), 0, 1);
}
}
}
Expand Down
28 changes: 24 additions & 4 deletions src/lib/UserSetting/UserSetting.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
use Ibexa\Contracts\Core\Repository\Values\ValueObject;

/**
* @property string $identifier
* @property string $name
* @property string $description
* @property string $value
* @property string $identifier @deprecated use {@see UserSetting::getIdentifier()} instead.
* @property string $name @deprecated use {@see UserSetting::getName()} instead.
* @property string $description @deprecated use {@see UserSetting::getDescription()} instead.
* @property string $value @deprecated use {@see UserSetting::getValue()} instead.
alongosz marked this conversation as resolved.
Show resolved Hide resolved
*/
class UserSetting extends ValueObject
{
Expand All @@ -29,6 +29,26 @@ class UserSetting extends ValueObject

/** @var string */
protected $value;

public function getIdentifier(): string
{
return $this->identifier;
}

public function getName(): string
{
return $this->name;
}

public function getDescription(): string
{
return $this->description;
}

public function getValue(): string
{
return $this->value;
}
}

class_alias(UserSetting::class, 'EzSystems\EzPlatformUser\UserSetting\UserSetting');
Loading