protected function AddMediaFormBase::getTargetBundles in Media Directories 2.x
Same name and namespace in other branches
- 8 modules/media_directories_ui/src/Form/AddMediaFormBase.php \Drupal\media_directories_ui\Form\AddMediaFormBase::getTargetBundles()
Get the allowed target bundles from the form state.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state: The form state.
Return value
array All allowed target bundle names.
6 calls to AddMediaFormBase::getTargetBundles()
- AddMediaFormBase::buildForm in modules/
media_directories_ui/ src/ Form/ AddMediaFormBase.php - Form constructor.
- AddMediaFormBase::updateFormCallback in modules/
media_directories_ui/ src/ Form/ AddMediaFormBase.php - AJAX callback to update the entire form based on source field input.
- FileUploadForm::processUploadElement in modules/
media_directories_ui/ src/ Form/ FileUploadForm.php - Processes an upload (managed_file) element.
- MediaCombinedUploadForm::buildInputElement in modules/
media_directories_ui/ src/ Form/ MediaCombinedUploadForm.php - Inheriting classes need to build the desired input element.
- MediaCombinedUploadForm::updateFormCallback in modules/
media_directories_ui/ src/ Form/ MediaCombinedUploadForm.php - AJAX callback to update the entire form based on source field input.
1 method overrides AddMediaFormBase::getTargetBundles()
- MediaEditForm::getTargetBundles in modules/
media_directories_ui/ src/ Form/ MediaEditForm.php - Get the allowed target bundles from the form state.
File
- modules/
media_directories_ui/ src/ Form/ AddMediaFormBase.php, line 150
Class
- AddMediaFormBase
- Class AddMediaFormBase.
Namespace
Drupal\media_directories_ui\FormCode
protected function getTargetBundles(FormStateInterface $form_state) {
$bundles = $form_state
->get('target_bundles');
return $bundles;
}