function RestPermissions::__construct

Same name in other branches
  1. 9 core/modules/rest/src/RestPermissions.php \Drupal\rest\RestPermissions::__construct()
  2. 8.9.x core/modules/rest/src/RestPermissions.php \Drupal\rest\RestPermissions::__construct()
  3. 10 core/modules/rest/src/RestPermissions.php \Drupal\rest\RestPermissions::__construct()

Constructs a new RestPermissions instance.

Parameters

\Drupal\rest\Plugin\Type\ResourcePluginManager $rest_plugin_manager: The rest resource plugin manager.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

File

core/modules/rest/src/RestPermissions.php, line 38

Class

RestPermissions
Provides rest module permissions.

Namespace

Drupal\rest

Code

public function __construct(ResourcePluginManager $rest_plugin_manager, EntityTypeManagerInterface $entity_type_manager) {
    $this->restPluginManager = $rest_plugin_manager;
    $this->resourceConfigStorage = $entity_type_manager->getStorage('rest_resource_config');
}

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