8000 Workflow: align Example for property access with implementation of Me… · SirRFI/symfony-docs@5272a25 · GitHub
[go: up one dir, main page]

Skip to content
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

Appearance settings

Commit 5272a25

Browse files
simon-schubertOskarStark
authored andcommitted
Workflow: align Example for property access with implementation of Me…
1 parent 4f0cd5a commit 5272a25

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 following property is used by the marking store::
163+
The configured property will be used 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)
0