function WorkflowCustomAccessType::defaultConfiguration
Overrides WorkflowTypeBase::defaultConfiguration
File
-
core/
modules/ workflows/ tests/ modules/ workflow_type_test/ src/ Plugin/ WorkflowType/ WorkflowCustomAccessType.php, line 26
Class
- WorkflowCustomAccessType
- A test workflow with custom state/transition access rules applied.
Namespace
Drupal\workflow_type_test\Plugin\WorkflowTypeCode
public function defaultConfiguration() {
return [
'states' => [
'cannot_update' => [
'label' => 'Cannot Update State',
'weight' => 0,
],
'cannot_delete' => [
'label' => 'Cannot Delete State',
'weight' => 0,
],
],
'transitions' => [
'cannot_update' => [
'label' => 'Cannot Update Transition',
'to' => 'cannot_update',
'weight' => 0,
'from' => [
'cannot_update',
],
],
'cannot_delete' => [
'label' => 'Cannot Delete Transition',
'to' => 'cannot_delete',
'weight' => 1,
'from' => [
'cannot_delete',
],
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.