function EntityStorageBase::__get

Warns subclasses not to directly access the deprecated entityClass property.

@todo Remove this in Drupal 10.

Parameters

string $name: The name of the property to get.

See also

https://www.drupal.org/project/drupal/issues/3244802

File

core/lib/Drupal/Core/Entity/EntityStorageBase.php, line 127

Class

EntityStorageBase
A base entity storage class.

Namespace

Drupal\Core\Entity

Code

public function __get($name) {
    if ($name === 'entityClass') {
        @trigger_error('Accessing the entityClass property directly is deprecated in drupal:9.3.0. Use ::getEntityClass() instead. See https://www.drupal.org/node/3191609', E_USER_DEPRECATED);
        return $this->getEntityClass();
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.