You are here

protected function AddMediaFormBase::getSelectionMode in Media Directories 2.x

Same name and namespace in other branches
  1. 8 modules/media_directories_ui/src/Form/AddMediaFormBase.php \Drupal\media_directories_ui\Form\AddMediaFormBase::getSelectionMode()

Get the current selection mode from the form state.

Parameters

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

Return value

string The current selection mode.

2 calls to AddMediaFormBase::getSelectionMode()
AddMediaFormBase::buildForm in modules/media_directories_ui/src/Form/AddMediaFormBase.php
Form constructor.
FileUploadForm::processUploadElement in modules/media_directories_ui/src/Form/FileUploadForm.php
Processes an upload (managed_file) element.

File

modules/media_directories_ui/src/Form/AddMediaFormBase.php, line 165

Class

AddMediaFormBase
Class AddMediaFormBase.

Namespace

Drupal\media_directories_ui\Form

Code

protected function getSelectionMode(FormStateInterface $form_state) {
  $selection_mode = $form_state
    ->get('selection_mode');
  return $selection_mode;
}