Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
typed_data
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
typed_data
Merge requests
!16
Issue
#3456855
by TR: [10.3] Convert DataType plugin discovery to attributes
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3456855
by TR: [10.3] Convert DataType plugin discovery to attributes
issue/typed_data-3456855:3456855-10.3-convert-datatype
into
2.1.x
Overview
0
Commits
2
Pipelines
3
Changes
2
Merged
Tim Rohaly
requested to merge
issue/typed_data-3456855:3456855-10.3-convert-datatype
into
2.1.x
10 months ago
Overview
0
Commits
2
Pipelines
3
Changes
2
Expand
Closes
#3456855
0
0
Merge request reports
Compare
2.1.x
version 2
7ca844fc
10 months ago
version 1
0a14f689
10 months ago
2.1.x (base)
and
latest version
latest version
7ca844fc
2 commits,
10 months ago
version 2
7ca844fc
2 commits,
10 months ago
version 1
0a14f689
1 commit,
10 months ago
2 files
+
13
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/Plugin/DataType/IpAddressData.php
+
7
−
6
Options
@@ -2,18 +2,19 @@
namespace
Drupal\typed_data\Plugin\DataType
;
use
Drupal\Core\StringTranslation\TranslatableMarkup
;
use
Drupal\Core\TypedData\Attribute\DataType
;
use
Drupal\Core\TypedData\Plugin\DataType\StringData
;
use
Drupal\typed_data
\TypedData\Type\IpAddressInterface
;
/**
* The ip_address data type.
*
* @DataType(
* id = "ip_address",
* label = @Translation("IP address"),
* constraints = {"Ip" = {"version" = "all"}}
* )
*/
#
[
DataType
(
id
:
"ip_address"
,
label
:
new
TranslatableMarkup
(
"IP address"
),
constraints
:
[
"Ip"
=>
[
"version"
=>
"all"
]]
)]
class
IpAddressData
extends
StringData
implements
IpAddressInterface
{
/**
Loading