function EntityResource::calculateDependencies

Same name in other branches
  1. 9 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. 11.x core/modules/rest/src/Plugin/rest/resource/EntityResource.php \Drupal\rest\Plugin\rest\resource\EntityResource::calculateDependencies()

Overrides DependentPluginInterface::calculateDependencies

File

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

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.