You are here

function hostingService_example_basic::update in Hostmaster (Aegir) 6

Update a record in the database.

Called by hosting_server_hook_update().

For this example we will use the variables table, but you should create your own tables with an install file and hook_schema.

Overrides hostingService::update

File

modules/hosting/example/hosting_example.service.inc, line 173
Example service implementation for the hosting front end.

Class

hostingService_example_basic
An implementation of the example service type, registered with hook_hosting_service.

Code

function update() {

  // REMEMBER TO CALL THE PARENT!
  parent::update();
  variable_set('hosting_example_field_' . $this->server->nid, $this->example_field);
}