original_string: public function getSourceFieldName($media_type) {
      $bundle = $this->entityTypeManager->getStorage('media_type')->load($media_type);
      if (!$bundle) {
        throw new NotFoundHttpException("Bundle $media_type does not exist");
      }
  
      $type_configuration = $bundle->get('source_configuration');
      if (!isset($type_configuration['source_field'])) {
        return NULL;
      }
  
      return $type_configuration['source_field'];
    }
code: public function getSourceFieldName($media_type) {
      $bundle = $this->entityTypeManager->getStorage('media_type')->load($media_type);
      if (!$bundle) {
        throw new NotFoundHttpException("Bundle $media_type does not exist");
      }
  
      $type_configuration = $bundle->get('source_configuration');
      if (!isset($type_configuration['source_field'])) {
        return NULL;
      }
  
      return $type_configuration['source_field'];
    }
code_tokens: public function getSourceFieldName ( $ media_type ) { $ bundle = $ this -> entityTypeManager -> getStorage ( 'media_type' ) -> load ( $ media_type ) ; if ( ! $ bundle ) { throw new NotFoundHttpException ( "Bundle $media_type does not exist" ) ; } $ type_configuration = $ bundle -> get ( 'source_configuration' ) ; if ( ! isset ( $ type_configuration [ 'source_field' ] ) ) { return NULL ; } return $ type_configuration [ 'source_field' ] ; }
docstring: Gets the name of a source field for a Media.
  
  @param string $media_type
  Media bundle whose source field you are searching for.
  
  @return string|null
  Field name if it exists in configuration, else NULL.
docstring_tokens: Gets the name of a source field for a Media .