Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!7173
Resolve
#2413471
"D11"
Code
Review changes
Check out branch
Open in Workspace
Download
Patches
Plain diff
Expand sidebar
Open
Resolve
#2413471
"D11"
issue/drupal-2413471:2413471-d11
into
11.x
Overview
0
Commits
3
Pipelines
2
Changes
7
Open
Resolve #2413471 "D11"
jackwrfuller
requested to merge
issue/drupal-2413471:2413471-d11
into
11.x
Mar 25, 2024
Overview
0
Commits
3
Pipelines
2
Changes
7
Closes
#2413471
0
0
Merge request reports
Compare
11.x
version 1
ba01aa96
Mar 25, 2024
11.x (base)
and
latest version
latest version
43a2e03d
3 commits,
Mar 25, 2024
version 1
ba01aa96
2 commits,
Mar 25, 2024
7 files
+
94
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
core/lib/Drupal/Core/Field/FieldItemBase.php
+
9
−
2
View file @ 43a2e03d
Edit in single-file editor
Open in Web IDE
Show full file
@@ -148,14 +148,21 @@ protected function writePropertyValue($property_name, $value) {
* {@inheritdoc}
*/
public
function
__get
(
$name
)
{
// There is either a property object or a plain value - possibly for a
// not-defined property. If we have a plain value, directly return it.
// If the property has been instantiated already, return its value.
if
(
isset
(
$this
->
properties
[
$name
]))
{
return
$this
->
properties
[
$name
]
->
getValue
();
}
// If the property has not been instantiated, return its plain value if we
// have one.
elseif
(
isset
(
$this
->
values
[
$name
]))
{
return
$this
->
values
[
$name
];
}
// Instantiate the property if it exists, and return its value. We do this
// last, because property instantiation is often slower than the previous
// retrieval methods.
elseif
(
$this
->
definition
->
getPropertyDefinition
(
$name
))
{
return
$this
->
get
(
$name
)
->
getValue
();
}
}
/**
Loading