From 92b0a2baba3ca31e069e48c8e39f563f65c02744 Mon Sep 17 00:00:00 2001 From: Jrson <45284565+jrson83@users.noreply.github.com> Date: Tue, 12 Nov 2024 18:45:25 +0100 Subject: [PATCH] Update entities-via-attributes.md - fix wrong indentation in code block - fix import statement of `EntityCustomFieldsTrait` --- .../framework/data-handling/entities-via-attributes.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/guides/plugins/plugins/framework/data-handling/entities-via-attributes.md b/guides/plugins/plugins/framework/data-handling/entities-via-attributes.md index d4eca937f..580f8b85f 100644 --- a/guides/plugins/plugins/framework/data-handling/entities-via-attributes.md +++ b/guides/plugins/plugins/framework/data-handling/entities-via-attributes.md @@ -58,8 +58,8 @@ class ExampleEntity extends Entity #[PrimaryKey] #[Field(type: FieldType::UUID)] public string $id; - - #[Field(type: FieldType::STRING)] + + #[Field(type: FieldType::STRING)] public string $string; #[Field(type: FieldType::TEXT)] @@ -285,7 +285,7 @@ Also, you don't have to define any `EntityTranslationDefinition` or `EntityColle namespace Examples; use Shopware\Core\Framework\DataAbstractionLayer\Attribute\AutoIncrement; -use Shopware\Core\Framework\DataAbstractionLayer\Attribute\CustomFields; +use Shopware\Core\Framework\DataAbstractionLayer\EntityCustomFieldsTrait; use Shopware\Core\Framework\DataAbstractionLayer\Attribute\Entity as EntityAttribute; use Shopware\Core\Framework\DataAbstractionLayer\Attribute\Field; use Shopware\Core\Framework\DataAbstractionLayer\Attribute\FieldType; @@ -422,4 +422,4 @@ class ExampleEntity extends Entity public ?array $translations = null; } -``` \ No newline at end of file +```