Skip to content
Snippets Groups Projects
Commit c6d6099f authored by Kim Pepper's avatar Kim Pepper Committed by quietone
Browse files

Address feedback

parent b7511c37
No related branches found
No related tags found
1 merge request!6874Fixes #3420981 Convert FieldType plugin discovery to attributes
......@@ -23,10 +23,8 @@ class FieldType extends Plugin {
*
* @param string $id
* The plugin ID.
* @param \Drupal\Core\StringTranslation\TranslatableMarkup|null $label
* @param \Drupal\Core\StringTranslation\TranslatableMarkup $label
* The human-readable name of the field type.
* @param string|null $module
* The name of the module providing the field type plugin.
* @param \Drupal\Core\StringTranslation\TranslatableMarkup|array|null $description
* (optional) A short human-readable description for the field type.
* @param string $category
......@@ -61,16 +59,14 @@ class FieldType extends Plugin {
* (optional) An array of column groups for the field type.
* @param array $serialized_property_names
* (optional) An array of property names that should be serialized.
* @param bool $unwrap_for_canonical_representation
* (optional) Whether the typed object wraps the canonical representation of
* the data.
* @param string|null $deriver
* (optional) The deriver class for the data type.
* @param string|null $module
* The name of the module providing the field type plugin.
*/
public function __construct(
public readonly string $id,
public readonly ?TranslatableMarkup $label = NULL,
public readonly ?string $module = NULL,
public readonly TranslatableMarkup $label,
public readonly TranslatableMarkup|array|null $description = NULL,
public readonly string $category = '',
public readonly int $weight = 0,
......@@ -83,8 +79,8 @@ public function __construct(
public readonly array $config_dependencies = [],
public readonly array $column_groups = [],
public readonly array $serialized_property_names = [],
public readonly bool $unwrap_for_canonical_representation = TRUE,
public readonly ?string $deriver = NULL,
public readonly ?string $module = NULL,
) {
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment