You are here

public static function PushManager::submitForm in Open Social 8.7

Same name and namespace in other branches
  1. 8.9 modules/custom/activity_send/modules/activity_send_push_notification/src/PushManager.php \Drupal\activity_send_push_notification\PushManager::submitForm()
  2. 8.8 modules/custom/activity_send/modules/activity_send_push_notification/src/PushManager.php \Drupal\activity_send_push_notification\PushManager::submitForm()
  3. 10.3.x modules/custom/activity_send/modules/activity_send_push_notification/src/PushManager.php \Drupal\activity_send_push_notification\PushManager::submitForm()
  4. 10.0.x modules/custom/activity_send/modules/activity_send_push_notification/src/PushManager.php \Drupal\activity_send_push_notification\PushManager::submitForm()
  5. 10.1.x modules/custom/activity_send/modules/activity_send_push_notification/src/PushManager.php \Drupal\activity_send_push_notification\PushManager::submitForm()
  6. 10.2.x modules/custom/activity_send/modules/activity_send_push_notification/src/PushManager.php \Drupal\activity_send_push_notification\PushManager::submitForm()

Save settings of plugin instances.

Parameters

array $form: The form.

\Drupal\Core\Form\FormStateInterface $form_state: The form state.

File

modules/custom/activity_send/modules/activity_send_push_notification/src/PushManager.php, line 68

Class

PushManager
Class PushManager.

Namespace

Drupal\activity_send_push_notification

Code

public static function submitForm(array $form, FormStateInterface $form_state) {

  /** @var \Drupal\Component\Plugin\PluginManagerInterface $service */
  $service = \Drupal::service('plugin.manager.push');
  foreach ($service
    ->getDefinitions() as $plugin_id => $definition) {

    /** @var \Drupal\activity_send_push_notification\PushInterface $plugin */
    $plugin = $service
      ->createInstance($plugin_id);
    if ($plugin
      ->access()) {
      $plugin
        ->submitForm($form_state);
    }
  }
}