You are here

protected function ActionForm::getFids in Filebrowser 8.2

Same name and namespace in other branches
  1. 3.x src/Form/ActionForm.php \Drupal\filebrowser\Form\ActionForm::getFids()
2 calls to ActionForm::getFids()
ActionForm::ajaxValidate in src/Form/ActionForm.php
ActionForm::validateForm in src/Form/ActionForm.php
Form validation handler.

File

src/Form/ActionForm.php, line 174

Class

ActionForm
Class ActionForm.

Namespace

Drupal\filebrowser\Form

Code

protected function getFids($form, FormStateInterface $form_state) {
  foreach ($form_state
    ->getValue('table') as $key => $value) {
    if ($value) {
      $fids[] = $form['table']['#options'][$key]['fid'];
    }
  }
  $selected_fids = empty($fids) ? null : implode(',', $fids);
  return $selected_fids;
}