You are here

public static function Scope::create in OAuth2 Server 8

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

Return value

static The entity object.

Overrides EntityBase::create

1 call to Scope::create()
Server::postSave in src/Entity/Server.php
Acts on a saved entity before the insert or update hook is invoked.

File

src/Entity/Scope.php, line 83

Class

Scope
Defines the OAuth2 scope entity.

Namespace

Drupal\oauth2_server\Entity

Code

public static function create(array $values = []) {
  if (isset($values['server_id']) && isset($values['scope_id'])) {
    $values['id'] = $values['server_id'] . '_' . $values['scope_id'];
  }
  return parent::create($values);
}