Welcome To Our Shell

Mister Spy & Souheyl Bypass Shell

Current Path : /var/www/html1/web/core/modules/system/tests/modules/batch_test/src/Form/

Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
Upload File :
Current File : /var/www/html1/web/core/modules/system/tests/modules/batch_test/src/Form/BatchTestChainedForm.php

<?php

namespace Drupal\batch_test\Form;

use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;

/**
 * Generate form of id batch_test_chained_form.
 *
 * @internal
 */
class BatchTestChainedForm extends FormBase {

  /**
   * {@inheritdoc}
   */
  public function getFormId() {
    return 'batch_test_chained_form';
  }

  /**
   * {@inheritdoc}
   */
  public function buildForm(array $form, FormStateInterface $form_state) {
    // This value is used to test that $form_state persists through batched
    // submit handlers.
    $form['value'] = [
      '#type' => 'textfield',
      '#title' => 'Value',
      '#default_value' => 1,
    ];
    $form['submit'] = [
      '#type' => 'submit',
      '#value' => 'Submit',
    ];
    $form['#submit'] = [
      'Drupal\batch_test\Form\BatchTestChainedForm::batchTestChainedFormSubmit1',
      'Drupal\batch_test\Form\BatchTestChainedForm::batchTestChainedFormSubmit2',
      'Drupal\batch_test\Form\BatchTestChainedForm::batchTestChainedFormSubmit3',
      'Drupal\batch_test\Form\BatchTestChainedForm::batchTestChainedFormSubmit4',
    ];
    return $form;
  }

  /**
   * {@inheritdoc}
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
  }

  /**
   * Form submission handler #1 for batch_test_chained_form
   */
  public static function batchTestChainedFormSubmit1($form, FormStateInterface $form_state) {
    batch_test_stack(NULL, TRUE);

    batch_test_stack('submit handler 1');
    batch_test_stack('value = ' . $form_state->getValue('value'));

    $value = &$form_state->getValue('value');
    $value++;
    batch_set(_batch_test_batch_1());

    $form_state->setRedirect('batch_test.redirect');
  }

  /**
   * Form submission handler #2 for batch_test_chained_form
   */
  public static function batchTestChainedFormSubmit2($form, FormStateInterface $form_state) {
    batch_test_stack('submit handler 2');
    batch_test_stack('value = ' . $form_state->getValue('value'));

    $value = &$form_state->getValue('value');
    $value++;
    batch_set(_batch_test_batch_2());

    $form_state->setRedirect('batch_test.redirect');
  }

  /**
   * Form submission handler #3 for batch_test_chained_form
   */
  public static function batchTestChainedFormSubmit3($form, FormStateInterface $form_state) {
    batch_test_stack('submit handler 3');
    batch_test_stack('value = ' . $form_state->getValue('value'));

    $value = &$form_state->getValue('value');
    $value++;

    $form_state->setRedirect('batch_test.redirect');
  }

  /**
   * Form submission handler #4 for batch_test_chained_form
   */
  public static function batchTestChainedFormSubmit4($form, FormStateInterface $form_state) {
    batch_test_stack('submit handler 4');
    batch_test_stack('value = ' . $form_state->getValue('value'));

    $value = &$form_state->getValue('value');
    $value++;
    batch_set(_batch_test_batch_3());

    $form_state->setRedirect('batch_test.redirect');
  }

}

bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped)
Email: contact@elmoujehidin.net bypass 1.0, Devloped By El Moujahidin (the source has been moved and devloped) Email: contact@elmoujehidin.net