Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita4cce1e

Browse files
committed
bug#12988 Workflow: align Example for property access with implementation of Me… (simon-schubert)
This PR was submitted for the 4.4 branch but it was squashed and merged into the 4.3 branch instead (closes#12988).Discussion----------Workflow: align Example for property access with implementation of Me…The Implementation in Symfony\Component\Workflow\MarkingStore\MethodMarkingStore does not use symfony/property-access (as the former implementations like e.g. SingleStateMarkingStore did) and requires to have getter/setter implemented in your entity. Therefore the example in docs does not work (any longer). I don't know, why the usage of symfony/property-access was dropped, but it seemed to me not accidentally. That's why I decided to send a PR to update docs. But maybe the implementation is "wrong" and should be changed instead. So please check carefully. Thank you.Commits-------5272a25 Workflow: align Example for property access with implementation of Me…
2 parents4f0cd5a +5272a25 commita4cce1e

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

‎workflow.rst

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -160,14 +160,25 @@ like this:
160160
If you are creating your first workflows, consider using the ``workflow:dump``
161161
command to:doc:`debug the workflow contents</workflow/dumping-workflows>`.
162162

163-
As configured, the followingpropertyisused by the marking store::
163+
The configuredpropertywill beused via it's implemented getter/setter methods by the marking store::
164164

165165
class BlogPost
166166
{
167-
// This property is used by the marking store
168-
public $currentPlace;
169-
public $title;
170-
public $content;
167+
// the configured property must be declared
168+
private $currentPlace;
169+
private $title;
170+
private $content;
171+
172+
// getter/setter methods must exist for property access by the marking store
173+
public function getCurrentPlace()
174+
{
175+
return $this->currentPlace;
176+
}
177+
178+
public function setCurrentPlace($currentPlace, $context = [])
179+
{
180+
$this->currentPlace = $currentPlace;
181+
}
171182
}
172183

173184
..note::

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp