You are here

function hosting_package_instance_create in Hosting 7.3

Same name and namespace in other branches
  1. 5 package/hosting_package.instance.inc \hosting_package_instance_create()
  2. 6.2 package/hosting_package.instance.inc \hosting_package_instance_create()
  3. 7.4 package/hosting_package.instance.inc \hosting_package_instance_create()

@todo Please document this function.

See also

http://drupal.org/node/1354

1 call to hosting_package_instance_create()
hosting_package_instance_save in package/hosting_package.instance.inc
@todo Please document this function.

File

package/hosting_package.instance.inc, line 137
API for mapping packages to various Hosting node types

Code

function hosting_package_instance_create(&$instance) {
  $id = db_insert('hosting_package_instance')
    ->fields(array(
    'rid' => $instance->rid,
    'package_id' => $instance->package_id,
    'filename' => $instance->filename,
    'schema_version' => $instance->schema_version,
    'version' => $instance->version,
    'version_code' => $instance->version_code,
    'status' => $instance->status,
    'platform' => $instance->platform,
  ))
    ->execute();
  $instance->iid = $id;
  _hosting_package_instance_languages($instance);
}