Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Merge requests
!6662
#3420994
Convert RestResource plugin discovery to attributes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
#3420994
Convert RestResource plugin discovery to attributes
issue/drupal-3420994:3420994-convert-restresource-plugin
into
11.x
Overview
0
Commits
1
Pipelines
1
Changes
7
Closed
Kim Pepper
requested to merge
issue/drupal-3420994:3420994-convert-restresource-plugin
into
11.x
1 year ago
Overview
0
Commits
1
Pipelines
1
Changes
7
Expand
Closes
#3420994
0
0
Merge request reports
Compare
11.x
11.x (base)
and
latest version
latest version
6ff23d85
1 commit,
1 year ago
7 files
+
115
−
45
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
7
Search (e.g. *.vue) (Ctrl+P)
core/modules/dblog/src/Plugin/rest/resource/DbLogResource.php
+
9
−
8
Options
@@ -3,6 +3,8 @@
namespace
Drupal\dblog\Plugin\rest\resource
;
use
Drupal\Core\Database\Database
;
use
Drupal\Core\StringTranslation\TranslatableMarkup
;
use
Drupal\rest\Attribute\RestResource
;
use
Drupal\rest\Plugin\ResourceBase
;
use
Drupal\rest\ResourceResponse
;
use
Symfony\Component\HttpKernel\Exception\BadRequestHttpException
;
@@ -10,15 +12,14 @@
/**
* Provides a resource for database watchdog log entries.
*
* @RestResource(
* id = "dblog",
* label = @Translation("Watchdog database log"),
* uri_paths = {
* "canonical" = "/dblog/{id}"
* }
* )
*/
#
[
RestResource
(
id
:
"dblog"
,
label
:
new
TranslatableMarkup
(
"Watchdog database log"
),
uri_paths
:
[
"canonical"
=>
"/dblog/
{
id
}
"
,
]
)]
class
DbLogResource
extends
ResourceBase
{
/**
Loading