Commit 856ae5ff authored by Derek Wright's avatar Derek Wright
Browse files

[#2570593]: Add @todo and @see about removing EntityStorageBase::entityClass BC layers in D10.

parent 3259b805
......@@ -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') {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment