function EntityResource::calculateDependencies

Same name and namespace in other branches
  1. 11.x core/modules/rest/src/Plugin/rest/resource/EntityResource.php \Drupal\rest\Plugin\rest\resource\EntityResource::calculateDependencies()
  2. 10 core/modules/rest/src/Plugin/rest/resource/EntityResource.php \Drupal\rest\Plugin\rest\resource\EntityResource::calculateDependencies()
  3. 8.9.x core/modules/rest/src/Plugin/rest/resource/EntityResource.php \Drupal\rest\Plugin\rest\resource\EntityResource::calculateDependencies()

File

core/modules/rest/src/Plugin/rest/resource/EntityResource.php, line 425

Class

EntityResource
Represents entities as resources.

Namespace

Drupal\rest\Plugin\rest\resource

Code

public function calculateDependencies() {
  if (isset($this->entityType)) {
    return [
      'module' => [
        $this->entityType
          ->getProvider(),
      ],
    ];
  }
}

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