function WorkflowTypeBase::setTransitionLabel
Sets a transition's label.
Parameters
string $transition_id: The transition ID.
string $label: The transition's label.
Return value
$this
Overrides WorkflowTypeInterface::setTransitionLabel
File
-
core/
modules/ workflows/ src/ Plugin/ WorkflowTypeBase.php, line 370
Class
- WorkflowTypeBase
- A base class for Workflow type plugins.
Namespace
Drupal\workflows\PluginCode
public function setTransitionLabel($transition_id, $label) {
if (!$this->hasTransition($transition_id)) {
throw new \InvalidArgumentException("The transition '{$transition_id}' does not exist in workflow.");
}
$this->configuration['transitions'][$transition_id]['label'] = $label;
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.