Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update usage.md, use 'attribute' not annotation #1433

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ want to make uploadable.

We already created an abstract representation of the filesystem (the mapping),
so we just have to tell the bundle which entity should use which mapping. In
this guide we'll use annotations to achieve this, but you can also use
this guide we'll use attributes to achieve this, but you can also use
[YAML](mapping/yaml.md) or [XML](mapping/xml.md).

First, annotate your class with the `Uploadable` annotation. This is really like
First, annotate your class with the `Uploadable` attribute. This is really like
a flag indicating that the entity contains uploadable fields.

Next, you have to create the two fields needed for the bundle to work:
Expand All @@ -62,7 +62,7 @@ Next, you have to create the two fields needed for the bundle to work:
object after the form is submitted. This should *not* be persisted to the
database, but you *do* need to annotate it.

The `UploadableField` annotation has a few options. They are as follows:
The `UploadableField` attribute has a few options. They are as follows:

* `mapping`: required, the mapping name specified in the bundle configuration to use;
* `fileNameProperty`: required, the property that will contain the name of the uploaded file;
Expand Down
Loading