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

[Workflow] Added function to get a specific transition#13907

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
javiereguiluz merged 1 commit intosymfony:5.2fromShaurifr:workflowTransition
Jan 8, 2021
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletionsworkflow.rst
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -229,6 +229,8 @@ what actions are allowed on a blog post::

// See all the available transitions for the post in the current state
$transitions = $workflow->getEnabledTransitions($post);
// See a specific available transition for the post in the current state
$transition = $workflow->getEnabledTransition($post, 'publish');

Accessing the Workflow in a Class
---------------------------------
Expand DownExpand Up@@ -649,6 +651,9 @@ of domain logic in your templates:
``workflow_transitions()``
Returns an array with all the transitions enabled for the given object.

``workflow_transition()``
Returns a specific transitions enabled for the given object and transition name.

``workflow_marked_places()``
Returns an array with the place names of the given marking.

Expand DownExpand Up@@ -883,6 +888,15 @@ In Twig templates, metadata is available via the ``workflow_metadata()`` functio
{% endfor %}
</ul>
</p>
<p>
<strong>to_review Priority</strong>
<ul>
<li>
to_review:
<code>{{ workflow_metadata(blog_post, 'priority', workflow_transition(blog_post, 'to_review')) }}</code>
</li>
</ul>
</p>

Learn more
----------
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp