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
!6818
Resolve
#3420984
"Convert layout displayvariant"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Closed
Resolve
#3420984
"Convert layout displayvariant"
issue/drupal-3420984:3420984-convert-layout-displayvariant
into
11.x
Overview
15
Commits
6
Pipelines
15
Changes
11
Closed
godotislate
requested to merge
issue/drupal-3420984:3420984-convert-layout-displayvariant
into
11.x
1 year ago
Overview
12
Commits
6
Pipelines
15
Changes
11
Expand
Closes
#3420984
0
0
Merge request reports
Compare
11.x
version 14
0896c0c6
1 year ago
version 13
e7054793
1 year ago
version 12
dcd769a7
1 year ago
version 11
7eeef37f
1 year ago
version 10
7e2f3efd
1 year ago
version 9
94b5c9e2
1 year ago
version 8
07c19afb
1 year ago
version 7
5b8bd2db
1 year ago
version 6
f2e82357
1 year ago
version 5
961b5585
1 year ago
version 4
2410d144
1 year ago
version 3
a611e10e
1 year ago
version 2
f0acf8ed
1 year ago
version 1
cd474fa9
1 year ago
11.x (base)
and
latest version
latest version
de5a8a0f
6 commits,
1 year ago
version 14
0896c0c6
6 commits,
1 year ago
version 13
e7054793
5 commits,
1 year ago
version 12
dcd769a7
9 commits,
1 year ago
version 11
7eeef37f
9 commits,
1 year ago
version 10
7e2f3efd
8 commits,
1 year ago
version 9
94b5c9e2
8 commits,
1 year ago
version 8
07c19afb
8 commits,
1 year ago
version 7
5b8bd2db
8 commits,
1 year ago
version 6
f2e82357
6 commits,
1 year ago
version 5
961b5585
5 commits,
1 year ago
version 4
2410d144
4 commits,
1 year ago
version 3
a611e10e
4 commits,
1 year ago
version 2
f0acf8ed
3 commits,
1 year ago
version 1
cd474fa9
3 commits,
1 year ago
11 files
+
98
−
23
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
11
Search (e.g. *.vue) (Ctrl+P)
Conflict: This file was added both in the source and target branches, but with different contents. Ask someone with write access to resolve it.
core/lib/Drupal/Core/Display/Attribute/DisplayVariant.php
0 → 100644
+
50
−
0
Options
<?php
namespace
Drupal\Core\Display\Attribute
;
use
Drupal\Component\Plugin\Attribute\Plugin
;
use
Drupal\Core\StringTranslation\TranslatableMarkup
;
/**
* Defines a display variant attribute object.
*
* Display variants are used to dictate the output of a given Display, which
* can be used to control the output of many parts of Drupal.
*
* Variants are usually chosen by some selection criteria, and are instantiated
* directly. Each variant must define its own approach to rendering, and can
* either load its own data or be injected with data from another Display
* object.
*
* Plugin namespace: Plugin\DisplayVariant
*
* For working examples, see
* - \Drupal\Core\Render\Plugin\DisplayVariant\SimplePageVariant
* - \Drupal\block\Plugin\DisplayVariant\BlockPageVariant
*
* @see \Drupal\Core\Display\VariantInterface
* @see \Drupal\Core\Display\VariantBase
* @see \Drupal\Core\Display\VariantManager
* @see \Drupal\Core\Display\PageVariantInterface
* @see plugin_api
*/
#[\Attribute(\Attribute::TARGET_CLASS)]
class
DisplayVariant
extends
Plugin
{
/**
* Constructs a DisplayVariant plugin attribute object.
*
* @param string $id
* The plugin ID.
* @param \Drupal\Core\StringTranslation\TranslatableMarkup $admin_label
* The administrative label.
* @param class-string|null $deriver
* (optional) The deriver class.
*/
public
function
__construct
(
public
readonly
string
$id
,
public
readonly
TranslatableMarkup
$admin_label
,
public
readonly
?string
$deriver
=
NULL
)
{}
}
Loading