function EntityStorageBase::__set

Warns subclasses not to directly set the deprecated entityClass property.

@todo Remove this in Drupal 10.

Parameters

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

mixed $value: The value to use.

See also

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

File

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

Class

EntityStorageBase
A base entity storage class.

Namespace

Drupal\Core\Entity

Code

public function __set(string $name, $value) : void {
    if ($name === 'entityClass') {
        @trigger_error('Setting the entityClass property directly is deprecated in drupal:9.3.0 and has no effect in drupal:10.0.0. See https://www.drupal.org/node/3191609', E_USER_DEPRECATED);
        $this->baseEntityClass = $value;
    }
}

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