diff --git a/src/Plugin/Field/FieldType/OsuIcon.php b/src/Plugin/Field/FieldType/OsuIcon.php index 8a717d5..1f4d503 100644 --- a/src/Plugin/Field/FieldType/OsuIcon.php +++ b/src/Plugin/Field/FieldType/OsuIcon.php @@ -29,11 +29,13 @@ public static function schema(FieldStorageDefinitionInterface $field_definition) // List the values that the field will save. This // field will only save a single value, 'value' 'value' => [ + 'description' => 'The icon name.', 'type' => 'text', 'size' => 'tiny', 'not null' => FALSE, ], 'size' => [ + 'description' => 'The icon size.', 'type' => 'text', 'size' => 'tiny', 'not null' => FALSE, @@ -47,8 +49,12 @@ public static function schema(FieldStorageDefinitionInterface $field_definition) */ public static function propertyDefinitions(FieldStorageDefinitionInterface $field_definition) { $properties = []; - $properties['value'] = DataDefinition::create('string'); - $properties['size'] = DataDefinition::create('string'); + $properties['value'] = DataDefinition::create('string') + ->setLabel(t('Name')) + ->setDescription(t('The icon name.')); + $properties['size'] = DataDefinition::create('string') + ->setLabel(t('Size')) + ->setDescription(t('The size of the icon.')); return $properties; }