Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. EntityResource.php

function EntityResource::calculateDependencies

Overrides DependentPluginInterface::calculateDependencies

File

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

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(),
            ],
        ];
    }
}
RSS feed
Powered by Drupal