Skip to content
Snippets Groups Projects

Issue #3456855 by TR: [10.3] Convert DataType plugin discovery to attributes

Merged Tim Rohaly requested to merge issue/typed_data-3456855:3456855-10.3-convert-datatype into 2.1.x
Files
2
@@ -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