-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[Workflow] Add a line about the attribute type when persisted. #9156
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
Changes from 6 commits
35d531a
8bad73f
41f5ea3
63a7df4
664b5e3
d1c0dd0
b9e3c0e
93afa79
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -138,7 +138,7 @@ like this: | |
|
||
class BlogPost | ||
{ | ||
// This property is used by the marking store | ||
// This property is used by the marking store, by default, Symfony set the marking as an array. | ||
public $currentPlace; | ||
public $title; | ||
public $content; | ||
|
@@ -155,7 +155,19 @@ like this: | |
The ``type`` (default value ``single_state``) and ``arguments`` (default value ``marking``) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Guikingone For 4.3+ this need to be removed no? |
||
attributes of the ``marking_store`` option are optional. If omitted, their default values | ||
will be used. | ||
|
||
.. note:: | ||
|
||
If a ``multiple_state`` is used, the attribute should be an ``array``, | ||
using Doctrine, you can use ``json``. | ||
|
||
If a ``single_state`` is used, the persisted state type should be a string, | ||
if you need to store an int (due to DB limitations and/or project constraints), | ||
be aware that you need to implement :class:`Symfony\\Component\\Workflow\\MarkingStore\\MarkingStoreInterface` | ||
in order to transform the int back to something understandable by Workflow. | ||
|
||
If something else is used, you're in charge of choosing the best storage format. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the previous tip related to MarkingStoreInterface apply in this case too? If yes, we must merge these two phrases. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @javiereguiluz yes it's apply to. So it should be merged There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Guikingone could you merge theses phrase? Thanks. After that, IMHO, we will be OK to merge it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Improved, to be checked 🙂 |
||
|
||
With this workflow named ``blog_publishing``, you can get help to decide | ||
what actions are allowed on a blog post:: | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.