You are here

function media_type_load in D7 Media 7

Loads a media type based on its machine name.

Parameters

string $name:

Return value

StdClass

3 calls to media_type_load()
MediaTypeTest::testCreate in test/media.types.test
Test creating a new type. Basic CRUD.
media_admin_type_manage_form_submit in includes/media.admin.inc
media_file_type_media_claim in includes/media.types.inc
Implements hook_file_type_TYPE_claim().

File

includes/media.types.inc, line 114
Helper functions related to media types. CRUD for saving their settings mainly.

Code

function media_type_load($name) {
  $types = media_type_get_types();
  if (isset($types[$name])) {
    return $types[$name];
  }
}