public function WorkflowTypeAttributeTrait::getWorkflow in Workflow 8
Returns the Workflow object of this object.
Return value
\Drupal\workflow\Entity\Workflow Workflow object.
3 calls to WorkflowTypeAttributeTrait::getWorkflow()
- WorkflowConfigTransition::save in src/
Entity/ WorkflowConfigTransition.php - Saves an entity permanently.
- WorkflowState::getOptions in src/
Entity/ WorkflowState.php - Returns the allowed values for the current state.
- WorkflowState::getTransitions in src/
Entity/ WorkflowState.php - Returns the allowed transitions for the current state.
File
- src/
WorkflowTypeAttributeTrait.php, line 52
Class
- WorkflowTypeAttributeTrait
- Wrapper methods for Workflow* objects.
Namespace
Drupal\workflowCode
public function getWorkflow() {
if (!empty($this->workflow)) {
return $this->workflow;
}
/* @noinspection PhpAssignmentInConditionInspection */
if ($wid = $this
->getWorkflowId()) {
$this->workflow = Workflow::load($wid);
}
return $this->workflow;
}