*/
public function buildForm(array $form, FormStateInterface $form_state, WorkflowInterface $workflow = NULL, $workflow_transition = NULL) {
try {
- $this->transition = $workflow->getTransition($workflow_transition);
+ $this->transition = $workflow->getTypePlugin()->getTransition($workflow_transition);
}
catch (\InvalidArgumentException $e) {
throw new NotFoundHttpException();
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
$this->workflow
- ->deleteTransition($this->transition->id())
- ->save();
+ ->getTypePlugin()
+ ->deleteTransition($this->transition->id());
+ $this->workflow->save();
drupal_set_message($this->t('%transition transition deleted.', ['%transition' => $this->transition->label()]));
$form_state->setRedirectUrl($this->getCancelUrl());