You are here

function hostingService_example_basic::update in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 example/example_service/hosting_example.service.inc \hostingService_example_basic::update()
  2. 7.3 example/example_service/hosting_example.service.inc \hostingService_example_basic::update()

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

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);
}