This allows to get the confirm form's flag entity in e.g., hook_form_alter() implementations, so it can be used for messaging etc.

Comments

brunodbo created an issue. See original summary.

socketwench’s picture

Status: Needs review » Needs work
+++ b/src/Form/FlagConfirmFormBase.php
@@ -30,8 +30,7 @@ abstract class FlagConfirmFormBase extends ConfirmFormBase {
+  public function buildForm(array $form, FormStateInterface $form_state, FlagInterface $flag = NULL, $entity_id = NULL) {

Why was this changed? It doesn't seem related...

The method otherwise is okay.

brunodbo’s picture

Status: Needs work » Needs review
StatusFileSize
new437 bytes

Oh, looks like my editor put buildForm()'s arguments on one line, sorry about that!

Removed that part for the new patch.

Status: Needs review » Needs work

The last submitted patch, 3: 2955701_confirm_form_get_flag_3.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

brunodbo’s picture

Status: Needs work » Needs review
StatusFileSize
new438 bytes

Not sure why this is failing. Here's a new reroll, instead of just removing the unneeded part from the patch.

Status: Needs review » Needs work

The last submitted patch, 5: 2955701_confirm_form_get_flag_4.patch, failed testing. View results
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.

socketwench’s picture

Status: Needs work » Reviewed & tested by the community

I've been seeing that Ajax error a lot this morning, so I'm inclined to think it's unrelated. Updated patch looks good, so this is RTBC.

  • socketwench committed 657e646 on 8.x-4.x authored by brunodbo
    Issue #2955701 by brunodbo, socketwench: Add method to get flag in...
socketwench’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.