function EntityForm::__get

File

core/lib/Drupal/Core/Entity/EntityForm.php, line 64

Class

EntityForm
Base class for entity forms.

Namespace

Drupal\Core\Entity

Code

public function __get($name) {
    // Removing core's usage of ::setEntityManager means that this deprecated
    // service wont be set. We provide it here for backwards compatibility.
    if ($name === 'entityManager') {
        @trigger_error('EntityForm::entityManager is deprecated in drupal:8.0.0 and is removed from drupal:9.0.0. Use EntityForm::entityTypeManager instead. See https://www.drupal.org/node/2549139', E_USER_DEPRECATED);
        return $this->privateEntityManager ?: \Drupal::entityManager();
    }
}

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