You are here

public function backup_migrate_item::get_id in Backup and Migrate 7.3

Same name and namespace in other branches
  1. 8.2 includes/crud.inc \backup_migrate_item::get_id()
  2. 8.3 includes/crud.inc \backup_migrate_item::get_id()
  3. 6.3 includes/crud.inc \backup_migrate_item::get_id()
  4. 6.2 includes/crud.inc \backup_migrate_item::get_id()
  5. 7.2 includes/crud.inc \backup_migrate_item::get_id()

Get the primary id for this item (if any is set).

We only handle single field keys since that's all we need.

15 calls to backup_migrate_item::get_id()
backup_migrate_destination::file_cache_get in includes/destinations.inc
Retrieve the file list.
backup_migrate_destination::file_cache_set in includes/destinations.inc
Cache the file list.
backup_migrate_destination::get_action_links in includes/destinations.inc
Get the action links for a destination.
backup_migrate_destination::get_file_links in includes/destinations.inc
Get the action links for a file on a given destination.
backup_migrate_destination_db::save_file in includes/destinations.db.inc
Save the info by importing it into the database.

... See full list

File

includes/crud.inc, line 595
CRUD functions for backup and migrate types (schedules, profiles etc.).

Class

backup_migrate_item
A base class for items which can be stored in the database.

Code

public function get_id() {
  $keys = (array) $this
    ->get_machine_name_field();
  return !empty($keys[0]) && !empty($this->{$keys[0]}) ? (string) $this->{$keys[0]} : '';
}