You are here

public function Scope::getServer in OAuth2 Server 8

Same name and namespace in other branches
  1. 2.0.x src/Entity/Scope.php \Drupal\oauth2_server\Entity\Scope::getServer()

Returns the server the scope belongs to.

Return value

\Drupal\oauth2_server\ServerInterface Returns the server object the scope belongs to.

Overrides ScopeInterface::getServer

1 call to Scope::getServer()
Scope::isDefault in src/Entity/Scope.php
Returns whether the scope is the default server scope.

File

src/Entity/Scope.php, line 110

Class

Scope
Defines the OAuth2 scope entity.

Namespace

Drupal\oauth2_server\Entity

Code

public function getServer() {
  if (!$this->server && $this->server_id) {
    $this->server = \Drupal::entityTypeManager()
      ->getStorage('oauth2_server')
      ->load($this->server_id);
  }
  return $this->server;
}