From 5272a25d4b00177cef3596d4ac29eaa34d672671 Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Sat, 25 Jan 2020 22:03:02 +0100 Subject: [PATCH] =?UTF-8?q?Workflow:=20align=20Example=20for=20property=20?= =?UTF-8?q?access=20with=20implementation=20of=20Me=E2=80=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow.rst | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/workflow.rst b/workflow.rst index 0c15a7e1b7f..70188d54e97 100644 --- a/workflow.rst +++ b/workflow.rst @@ -160,14 +160,25 @@ like this: If you are creating your first workflows, consider using the ``workflow:dump`` command to :doc:`debug the workflow contents `. -As configured, the following property is used by the marking store:: +The configured property will be used via it's implemented getter/setter methods by the marking store:: class BlogPost { - // This property is used by the marking store - public $currentPlace; - public $title; - public $content; + // the configured property must be declared + private $currentPlace; + private $title; + private $content; + + // getter/setter methods must exist for property access by the marking store + public function getCurrentPlace() + { + return $this->currentPlace; + } + + public function setCurrentPlace($currentPlace, $context = []) + { + $this->currentPlace = $currentPlace; + } } .. note::