This documentation is primarily intended for contributors of Media module core, but may be useful for Media module developers who want to know more about the inner workings of the Media module without stepping through code.
Tip: Clicking on a function will take you to a Web Site providing documentation generated by Doxygen.
Overview
Module Registration
see Media: hook_media_registration
Displaying Browser
Process route
- media_form_alter()
- Adds the media browser/uploader to node add/edit screen if enabled.
- Status: Implemented
- media_active_fields_for_node_type()
- Get a list of fields for the requested node type. Fields must bde enabled and match a registered kind.
- Status: Partially implemented (see todo)
- media_get_fields()
- Get all fields that can be enabled on a field type.
- Status: Implemented
- media_get_registered_modules()
- Get all of the modules which register with Media.
- Status: Implemented
- media_build_browser_form()
- Build data for the media browser display.
- Status: Partially implemented (see todo)
- media_get_resources()
- Fetches all resources registered in $resources. These appear in the browser as the horizontal tabs at the top.
- Status: Partially implmented (see todo). Bad documentation
- Calls the resource callback specified in hook_media_register().
- media_get_registered_modules()
- Gets all of the moduls which register with Media.
- Status: Implemented
Displaying Files
Displaying files in the browser previously added to the node add/edit screen. The process below uses the integrated local files browser as implemented in media_file_browser_local_files().
Process route
- media_get_resources()
- Fetches all resources registered and calls the specified callback. Items also added to the browser as the horizontal tabs at the top.
- Status: Partially implmented (see todo). Bad documentation.
- media_get_registered_modules()
- Gets all of the modules which register with Media.
- Status: Implemented
- Calls all callbacks from registered modules. Example case continues from here:
- media_display_user_files [callback]
- Gets list of files
- media_resource_display_user_files_form()
- Display files in a form element. Default for other forms to make use of.
- Status: Complete
- media_file_browser_local_files() [callback]
- Builds the local directory file browser form
- Status: Incomplete (see todo).
Uploading Files
Showing the upload form is similar to the process of displaying files until we start handling the files and getting into AHAH.
This section is incomplete
Process route
- media_get_resources()
- Fetches all resources registered and calls the specified callback. Items also added to the browser as the horizontal tabs at the top.
- Status: Partially implmented (see todo). Bad documentation.
- media_get_registered_modules()
- Gets all of the modules which register with Media.
- Status: Implemented
- Calls all callbacks from registered modules. Example case continues from here:
- media_upload_formatter_form() [callback]
- Formats upload form?
- Status: Unkown, no documentation.
Undocumented Hooks
These are hooks that haven't been sorted out yet.
- hook_media_user_files_select()
- Appears to be an artificial hook caused by documentation choices representing a callback.