function NodePermissions::__construct

File

core/modules/node/src/NodePermissions.php, line 21

Class

NodePermissions
Provides dynamic permissions for nodes of different types.

Namespace

Drupal\node

Code

public function __construct(?EntityTypeManagerInterface $entityTypeManager = NULL) {
    if ($entityTypeManager === NULL) {
        @trigger_error('Calling ' . __METHOD__ . ' without the $entityTypeManager argument is deprecated in drupal:11.2.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3515921', E_USER_DEPRECATED);
        $this->entityTypeManager = \Drupal::entityTypeManager();
    }
}

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