Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Issue forks
drupal-2570593
Commits
856ae5ff
Commit
856ae5ff
authored
Oct 19, 2021
by
Derek Wright
Browse files
[
#2570593
]: Add @todo and @see about removing EntityStorageBase::entityClass BC layers in D10.
parent
3259b805
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/lib/Drupal/Core/Entity/EntityStorageBase.php
View file @
856ae5ff
...
...
@@ -68,6 +68,9 @@ abstract class EntityStorageBase extends EntityHandlerBase implements EntityStor
* entity type, via hook_entity_bundle_info() or via
* hook_entity_bundle_info_alter().
*
* @todo Remove this in Drupal 10.
* @see https://www.drupal.org/project/drupal/issues/3244802
*
* @var string|null
*/
private
$baseEntityClass
;
...
...
@@ -108,6 +111,8 @@ public function __construct(EntityTypeInterface $entity_type, MemoryCacheInterfa
* {@inheritdoc}
*/
public
function
getEntityClass
(
?string
$bundle
=
NULL
):
string
{
// @todo Simplify this in Drupal 10 to return $this->entityType->getClass().
// @see https://www.drupal.org/project/drupal/issues/3244802
return
$this
->
baseEntityClass
??
$this
->
entityType
->
getClass
();
}
...
...
@@ -116,6 +121,9 @@ public function getEntityClass(?string $bundle = NULL): string {
*
* @param string $name
* The name of the property to get.
*
* @todo Remove this in Drupal 10.
* @see https://www.drupal.org/project/drupal/issues/3244802
*/
public
function
__get
(
$name
)
{
if
(
$name
===
'entityClass'
)
{
...
...
@@ -131,6 +139,9 @@ public function __get($name) {
* The name of the property to set.
* @param mixed $value
* The value to use.
*
* @todo Remove this in Drupal 10.
* @see https://www.drupal.org/project/drupal/issues/3244802
*/
public
function
__set
(
string
$name
,
$value
):
void
{
if
(
$name
===
'entityClass'
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment