public function WorkflowsFieldItem::getWorkflow in Workflows Field 8
Same name and namespace in other branches
- 2.x src/Plugin/Field/FieldType/WorkflowsFieldItem.php \Drupal\workflows_field\Plugin\Field\FieldType\WorkflowsFieldItem::getWorkflow()
Gets the workflow associated with this field.
Return value
\Drupal\workflows\WorkflowInterface|null The workflow of NULL.
3 calls to WorkflowsFieldItem::getWorkflow()
- WorkflowsFieldItem::applyDefaultValue in src/
Plugin/ Field/ FieldType/ WorkflowsFieldItem.php - Applies the default value.
- WorkflowsFieldItem::getPossibleOptions in src/
Plugin/ Field/ FieldType/ WorkflowsFieldItem.php - Returns an array of possible values with labels for display.
- WorkflowsFieldItem::getSettableOptions in src/
Plugin/ Field/ FieldType/ WorkflowsFieldItem.php - Returns an array of settable values with labels for display.
File
- src/
Plugin/ Field/ FieldType/ WorkflowsFieldItem.php, line 177
Class
- WorkflowsFieldItem
- Workflow state field item.
Namespace
Drupal\workflows_field\Plugin\Field\FieldTypeCode
public function getWorkflow() {
return !empty($this
->getSetting('workflow')) ? Workflow::load($this
->getSetting('workflow')) : NULL;
}