W3cubDocs

/Symfony 4.1

SingleStateMarkingStore

class SingleStateMarkingStore implements MarkingStoreInterface

SingleStateMarkingStore stores the marking into a property of the subject.

This store deals with a "single state" Marking. It means a subject can be in one and only one state at the same time.

Methods

__construct(string $property = 'marking', PropertyAccessorInterface $propertyAccessor = null)
Marking getMarking(object $subject)

Gets a Marking from a subject.

setMarking(object $subject, Marking $marking)

Sets a Marking to a subject.

string getProperty()

Details

__construct(string $property = 'marking', PropertyAccessorInterface $propertyAccessor = null)

Parameters

string $property
PropertyAccessorInterface $propertyAccessor

Marking getMarking(object $subject)

Gets a Marking from a subject.

Parameters

object $subject A subject

Return Value

Marking The marking

setMarking(object $subject, Marking $marking)

Sets a Marking to a subject.

Parameters

object $subject A subject
Marking $marking A marking

string getProperty()

Return Value

string

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Workflow/MarkingStore/SingleStateMarkingStore.html