Skip to content

Conversation

sebheitzmann
Copy link

complete doc on twig workflow_transition function.

@sebheitzmann
Copy link
Author

I don't think the Lint error is linked to my modifications

Copy link
Contributor

@HeahDude HeahDude left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why documenting parameters for only one method and not the others?

(This should target 4.4 as is)

@sebheitzmann
Copy link
Author

Why documenting parameters for only one method and not the others?

(This should target 4.4 as is)

you're right. I Will complete.

@94noni
Copy link
Contributor

94noni commented Jul 13, 2022

Why documenting parameters for only one method and not the others?

For me it is the documentation itself that is not necessary for parameters
why not directly add a link to the code like it is done for the Returns TransitionBlockerList for the given transition
after workflow_transition_blockers ?

@alamirault
Copy link
Contributor

Why documenting parameters for only one method and not the others?

For me it is the documentation itself that is not necessary for parameters why not directly add a link to the code like it is done for the Returns TransitionBlockerList for the given transition after workflow_transition_blockers ?

I agree with your suggestion, @sebheitzmann do you want give it a try ? (on 6.3 branch). If not I can

@sebheitzmann
Copy link
Author

I will do this this week-end. Thanks

Copy link
Member

@wouterj wouterj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there!

Just a friendly ping with a new suggestion. Do you still want to update this PR? Otherwise, we can always take over and finish this one for you :)

``workflow_can()``
Returns ``true`` if the given object can make the given transition.

``workflow_transitions()``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would, for all functions in this list, inline the parameters in the function name:

Suggested change
``workflow_transitions()``
``workflow_transitions(object $subject, string $name = null)``

I think this is the most clear and concise way of documenting them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment