diff --git a/core/modules/rest/src/Entity/RestEndpoint.php b/core/modules/rest/src/Entity/RestEndpoint.php index 28d3c16..ae4a4ac 100644 --- a/core/modules/rest/src/Entity/RestEndpoint.php +++ b/core/modules/rest/src/Entity/RestEndpoint.php @@ -34,6 +34,13 @@ class RestEndpoint extends ConfigEntityBase implements RestEndpointInterface { */ protected $configuration; + /** + * {@inheritdoc} + */ + public function id() { + return isset($this->plugin_id) ? $this->plugin_id : NULL; + } + protected function getLabelFromPlugin() { $plugin_definition = \Drupal::service('plugin.manager.rest') ->getDefinition(['id' => $this->plugin_id]); @@ -48,9 +55,9 @@ public function getSettings() { } /** - * @param array $settings + * {@inheritdoc} */ - public function setSettings($settings) { + public function setSettings(array $settings) { $this->configuration = $settings; } diff --git a/core/modules/rest/src/RestEndpointInterface.php b/core/modules/rest/src/RestEndpointInterface.php index cf03733..eb141d6 100644 --- a/core/modules/rest/src/RestEndpointInterface.php +++ b/core/modules/rest/src/RestEndpointInterface.php @@ -13,5 +13,5 @@ public function getSettings(); /** * @param array $settings */ - public function setSettings($settings); + public function setSettings(array $settings); } diff --git a/core/modules/rest/src/Tests/UpdateTest.php b/core/modules/rest/src/Tests/UpdateTest.php index 599c78b..23cf9fe 100644 --- a/core/modules/rest/src/Tests/UpdateTest.php +++ b/core/modules/rest/src/Tests/UpdateTest.php @@ -32,7 +32,7 @@ public function testPatchUpdate() { // @todo Test all other entity types here as well. $entity_type = 'entity_test'; - $this->enableService('entity:' . $entity_type, 'PATCH'); + $this->enableService('entity__' . $entity_type, 'PATCH'); // Create a user account that has the required permissions to create // resources via the REST API. $permissions = $this->entityPermissions($entity_type, 'update');