Commit 71b8d65c authored by VIPOOL TULSE's avatar VIPOOL TULSE Committed by John Voskuilen
Browse files

Issue #2934287 by vipul tulse: Error: Argument 2 passed to...

Issue #2934287 by vipul tulse: Error: Argument 2 passed to WorkflowManager::getWorkflowTransitionForm() must be an instance of Drupal\workflow\Entity\string
parent 9f461c4d
Loading
Loading
Loading
Loading
+1 −1
Changes for src/Entity/WorkflowManager.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -345,7 +345,7 @@ class WorkflowManager implements WorkflowManagerInterface {
  /**
   * {@inheritdoc}
   */
  public static function getWorkflowTransitionForm(EntityInterface $entity, string $field_name, array $form_state_additions = []) {
  public static function getWorkflowTransitionForm(EntityInterface $entity, $field_name, array $form_state_additions = []) {
    // Create a transition, to pass to the form. No need to use setValues().
    $current_sid = workflow_node_current_state($entity, $field_name);
    $transition = WorkflowTransition::create([$current_sid, 'field_name' => $field_name]);
+1 −1
Changes for src/Entity/WorkflowManagerInterface.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ interface WorkflowManagerInterface {
   *
   * @return
   */
  public static function getWorkflowTransitionForm(EntityInterface $entity, string $field_name, array $form_state_additions = []);
  public static function getWorkflowTransitionForm(EntityInterface $entity, $field_name, array $form_state_additions = []);

  /**
   * Returns the attached fields (via Field UI)