X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Fworkflows%2Fsrc%2FPlugin%2FWorkflowTypeTransitionFormBase.php;fp=web%2Fcore%2Fmodules%2Fworkflows%2Fsrc%2FPlugin%2FWorkflowTypeTransitionFormBase.php;h=e1d619644c108d9eb24b9982d2f321ccde8e7c47;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=0000000000000000000000000000000000000000;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/web/core/modules/workflows/src/Plugin/WorkflowTypeTransitionFormBase.php b/web/core/modules/workflows/src/Plugin/WorkflowTypeTransitionFormBase.php new file mode 100644 index 000000000..e1d619644 --- /dev/null +++ b/web/core/modules/workflows/src/Plugin/WorkflowTypeTransitionFormBase.php @@ -0,0 +1,49 @@ +workflowType = $plugin; + } + + /** + * {@inheritdoc} + */ + public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { + } + + /** + * {@inheritdoc} + */ + public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { + $values = $form_state->getValues(); + $transition = $form_state->get('transition'); + $configuration = $this->workflowType->getConfiguration(); + $configuration['transitions'][$transition->id()] = $values + $configuration['transitions'][$transition->id()]; + $this->workflowType->setConfiguration($configuration); + } + +}