Results

26.09.2019
cloudwords 8.x-1.x-dev :: src/Form/CloudwordsPrepareUninstallForm.php
  public function validateForm(array &$form, \Drupal\Core\Form\FormStateInterface $form_state) {
    if($form_state->getValue('confirm') != $this->confirm_text_entry){
      $form_state->setErrorByName('confirm', 'Confirm text required to delete all Cloudwords modules entities');
    }
  }

  public function submitForm(array &$form, \Drupal\Core\Form\FormStateInterface $form_state) {
    $projects_storage = \Drupal::entityTypeManager()->getStorage('cloudwords_project');
14.09.2018
comment_ip 8.x-1.x-dev :: src/Form/ConfirmBanDeleteMultiple.php
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    if ($form_state->getValue('confirm')) {
      $hostnames = [];
      foreach ($this->comments as $comment) {
        $hostnames[$comment->getHostname()] = $comment->getHostname();
        $comment->delete();
      }
29.10.2018
commerce_inventory 8.x-1.0-alpha6 :: src/Form/InventoryItemCreateConfirmForm.php
    // Create inventory items.
    if ($form_state->getValue('confirm') && $element['#id'] == 'edit-submit') {
      parent::submitForm($form, $form_state);
    }

  }

}
20.08.2019
competition 8.x-1.x-dev :: src/Form/CompetitionEntryDeleteMultiple.php
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    if ($form_state->getValue('confirm') && !empty($this->entityInfo)) {
      $delete_entities = [];
      /* @var \Drupal\core\Entity\EntityInterface[] $entities */
      $entities = $this->storage->loadMultiple(array_keys($this->entityInfo));

      foreach ($this->entityInfo as $id => $langcodes) {
        foreach ($langcodes as $langcode) {
01.05.2018
core_extend 8.x-1.0-alpha3 :: src/Form/EntityEditMultipleForm.php
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    if ($form_state->getValue('confirm') && $form_state->getTriggeringElement()['#id'] == 'edit-submit') {
      // Remove tempstore.
      $this->tempStoreFactory->get($this->getFormId())->delete(\Drupal::currentUser()->id());
      // Get number of items added.
      $completed_count = count(Element::children($form['list']['widget']['entities']));
      // Report inventory item creation.
      $message = $this->getSubmitMessage($completed_count);
07.02.2020
eus 8.x-1.x-dev :: src/Form/ConfirmSelectedusersEndSessionForm.php
    // Clear out the accounts from the temp store.
    $this->tempStoreFactory->get('eus_user_action')->delete($current_user_id);
    if ($form_state->getValue('confirm')) {
      foreach ($form_state->getValue('accounts') as $uid => $value) {
        // Prevent programmatic form submissions from destroying session of
        // user 1.
        if ($uid <= 1) {
          continue;
        }
01.04.2018
feeds 8.x-3.0-alpha1 :: src/Form/DeleteMultiple.php
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    if ($form_state->getValue('confirm') && !empty($this->feeds)) {
      $this->storage->delete($this->feeds);
      $this->tempStoreFactory->get('feeds_feed_multiple_delete_confirm')->delete($this->user->id());
      $count = count($this->feeds);
      $this->logger('feeds')->notice('Deleted @count feeds.', ['@count' => $count]);
      drupal_set_message($this->formatPlural($count, 'Deleted 1 feed.', 'Deleted @count posts.'));
    }
02.11.2018
merci 8.x-2.x-dev :: modules/merci_line_item/src/Form/DeleteMultiple.php
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    if ($form_state->getValue('confirm') && !empty($this->nodeInfo)) {
      $total_count = 0;
      $delete_nodes = [];
      /** @var \Drupal\Core\Entity\ContentEntityInterface[][] $delete_translations */
      $delete_translations = [];
      /** @var \Drupal\node\NodeInterface[] $nodes */
      $nodes = $this->storage->loadMultiple(array_keys($this->nodeInfo));
01.10.2020
message_thread 8.x-1.x-dev :: src/Form/DeleteMultiple.php
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    if ($form_state->getValue('confirm') && !empty($this->messageThreads)) {
      $this->storage->delete($this->messageThreads);
      $this->tempStoreFactory->get('message_thread_multiple_delete_confirm')->delete(\Drupal::currentUser()->id());
      $count = count($this->messageThreads);
      $this->logger('message_thread')->notice('Deleted @count message threads.', ['@count' => $count]);
      $this->messenger()->addStatus(\Drupal::translation()->formatPlural($count, 'Deleted 1 message thread.', 'Deleted @count message threads.'));
    }
14.06.2020
ptalk 8.x-0.x-dev :: src/Form/ThreadConfirmDeleteMultiple.php
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    if ($form_state->getValue('confirm') && !empty($this->threadInfo)) {
      /** @var \Drupal\ptalk\ThreadInterface[] $threads */
      $threads = $this->threadStorage->loadMultiple($this->threadInfo);

      foreach ($threads as $thread) {
        $thread->deleteThread(PTALK_DELETED);
        $thread->save();
25.06.2020
remote_config_sync 8.x-1.05 :: src/Form/SyncForm.php
    if (!$form_state->getValue('confirm') && !$config->get('disable_confirmation')) {
      $form_state->setErrorByName('confirm',
        $this->t('Before proceeding you must confirm this operation.')
      );
    }
  }
09.07.2018
signed_nodes 8.x-1.x-dev :: src/Form/ConfirmDeleteForm.php
  public function submitForm(array &$form, FormStateInterface $form_state) {
    // @todo: Do the deletion.
    if ($form_state->getValue('confirm') == 1) {
      $snid = $this->id;//$form_state->getValue('snid');
      $nid = signed_node_get_nid($snid);
      signed_nodes_delete_agreement($snid);
      // Logs a notice
      $message = t('Deleted signed node agreemet for Node ID = %name with all its user signed agreements', array('%name' => $nid));
      \Drupal::logger('signed_nodes')->notice($message);
25.07.2022
content_deploy 1.0.1 :: src/Form/ContentExportMultiple.php
  public function submitForm(array &$form, FormStateInterface $form_state) {

    if ($form_state->getValue('confirm') && !empty($this->entityList)) {
      // Delete the content tar file in case an older version exist.
      file_unmanaged_delete($this->getTempFile());

      $entities_list = [];
      foreach ($this->entityList as $entity_info) {
        $entities_list[] = [
11.04.2023
next_for_drupal_pantheon 1.0.x-dev :: src/Entity/Form/PantheonNextEnvForm.php
  public function generateSecret(array &$form, FormStateInterface $form_state) {
    $response = new AjaxResponse();
    if ($form_state->getValue('confirm')) {
      $password_generator = \Drupal::service('password_generator');
      $preview_secret = $password_generator->generate(21);
      $client_secret = $password_generator->generate(21);
      $next_site = $this->entity->getNextSite();
      $next_site->setPreviewSecret($preview_secret);
      $next_site->save();
30.07.2024
orphaned_files 1.0.1 :: src/Form/OrphanedFilesDeleteForm.php
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    if ($form_state->getValue('confirm')) {
      $database = Database::getConnection();
      $database->delete('file_managed')
        ->condition('fid', $this->fid)
        ->execute();

      $this->messenger()->addMessage($this->t('The file has been deleted.'));
11.12.2024
orgchart 1.0.0 :: src/Form/OrgchartDeleteForm.php
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    if ($form_state->getValue('confirm') == 1) {
      $this->orgchart->delete();
    }

    $form_state->setRedirect('orgchart.configuration');
  }
16.06.2020
acquia_connector 8.x-1.22 :: src/Form/SettingsForm.php
  public function submitForm(array &$form, FormStateInterface $form_state) {
    // If we're just resetting the values, do it first.
    if ($form_state->getValue('confirm')) {
      $this->state->deleteMultiple([
        'acquia_connector.identifier',
        'acquia_connector.key',
        'acquia_connector.application_uuid',
      ]);
12.10.2020
activitypub 1.0.x-dev :: src/Form/ActivityPubActivityDeleteMultiple.php
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    if ($form_state->getValue('confirm') && !empty($this->activityInfo)) {

      /** @var \Drupal\activitypub\Entity\ActivityPubActivityInterface[] $activities */
      $activities = $this->storage->loadMultiple(array_keys($this->activityInfo));
      $total_count = count($activities);

      if ($activities) {
11.10.2021
backup_permissions 2.0.0 :: src/Form/BackupPermissionsDeleteMultipleForm.php
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    if ($form_state->getValue('confirm') && !empty($this->backupinfo)) {
      foreach ($this->backupinfo as $id => $value) {
        $this->delete($id);
      }
      $this->tempStoreFactory->get('backup_permissions')
        ->delete(\Drupal::currentUser()->id());
    }
07.08.2020
bat 8.x-1.x-dev :: modules/bat_event_series/src/Entity/Form/EventSeriesUpdateConfirmForm.php
   */
  public function submitForm(array &$form, FormStateInterface $form_state) {
    if ($form_state->getValue('confirm')) {
      $this->bat_event_series->save();

      $this->messenger()->addMessage($this->t('Saved the %label Event series.', [
        '%label' => $this->bat_event_series->label(),
      ]));

Pages

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc