function backup_migrate_crud_type_load

cis7 crud.inc backup_migrate_crud_type_load($type)
cle7 crud.inc backup_migrate_crud_type_load($type)
elmsmedia7 crud.inc backup_migrate_crud_type_load($type)
icor7 crud.inc backup_migrate_crud_type_load($type)
meedjum_blog7 crud.inc backup_migrate_crud_type_load($type)
mooc7 crud.inc backup_migrate_crud_type_load($type)

Get a generic object of the given type to be used for static-like functions.

I'm not using actual static method calls since they don't work on variables prior to PHP 5.3.0

9 calls to backup_migrate_crud_type_load()
backup_migrate_crud_create_item in sites/all/modules/ulmus/backup_migrate/includes/crud.inc
Create a new item of the given type.
backup_migrate_crud_get_item in sites/all/modules/ulmus/backup_migrate/includes/crud.inc
Get an item of the specified type.
backup_migrate_crud_get_items in sites/all/modules/ulmus/backup_migrate/includes/crud.inc
Get all items of the given type.
backup_migrate_crud_menu in sites/all/modules/ulmus/backup_migrate/includes/crud.inc
Get the menu items handled by the CRUD code.
backup_migrate_crud_ui_create in sites/all/modules/ulmus/backup_migrate/includes/crud.inc
Page callback to create a new item.

... See full list

File

sites/all/modules/ulmus/backup_migrate/includes/crud.inc, line 38
CRUD functions for backup and migrate types (schedules, profiles etc.).

Code

function backup_migrate_crud_type_load($type) {
  $out = NULL;
  $types = backup_migrate_crud_types();
  if (!empty($types[$type])) {
    $info = $types[$type];
    if ($info['include']) {
      backup_migrate_include($info['include']);
    }
    $out = new $info['class'];
  }
  return $out;
}