protected function AddMediaFormBase::getSourceFieldName 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::getSourceFieldName()
Returns the name of the source field for a media type.
Parameters
\Drupal\media\MediaTypeInterface $media_type: The media type to get the source field name for.
Return value
string The name of the media type's source field.
3 calls to AddMediaFormBase::getSourceFieldName()
- AddMediaFormBase::buildEntityFormElement in modules/
media_directories_ui/ src/ Form/ AddMediaFormBase.php - Builds the sub-form for setting required fields on a new media item.
- AddMediaFormBase::processInputValues in modules/
media_directories_ui/ src/ Form/ AddMediaFormBase.php - Creates media items from source field input values.
- MediaCombinedUploadForm::processInputValues in modules/
media_directories_ui/ src/ Form/ MediaCombinedUploadForm.php - Creates media items from source field input values.
1 method overrides AddMediaFormBase::getSourceFieldName()
- MediaEditForm::getSourceFieldName in modules/
media_directories_ui/ src/ Form/ MediaEditForm.php - Returns the name of the source field for a media type.
File
- modules/
media_directories_ui/ src/ Form/ AddMediaFormBase.php, line 609
Class
- AddMediaFormBase
- Class AddMediaFormBase.
Namespace
Drupal\media_directories_ui\FormCode
protected function getSourceFieldName(MediaTypeInterface $media_type) {
return $media_type
->getSource()
->getSourceFieldDefinition($media_type)
->getName();
}