You are here

public function SettingsForm::remoteCheckboxCallback in Entity Share Cron 8

Same name and namespace in other branches
  1. 8.2 src/Form/SettingsForm.php \Drupal\entity_share_cron\Form\SettingsForm::remoteCheckboxCallback()
  2. 3.0.x src/Form/SettingsForm.php \Drupal\entity_share_cron\Form\SettingsForm::remoteCheckboxCallback()

Ajax callback for the remotes' checkboxes.

Parameters

array $form: The form array.

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

Return value

array A form element.

File

src/Form/SettingsForm.php, line 226

Class

SettingsForm
Module settings form.

Namespace

Drupal\entity_share_cron\Form

Code

public function remoteCheckboxCallback(array &$form, FormStateInterface $form_state) {
  $triggering_element = $form_state
    ->getTriggeringElement();
  $remote_id = $triggering_element['#parents'][1];
  return $form['remotes'][$remote_id]['channels'];
}