You are here

public function MostPopularService::update in Drupal Most Popular 7

Same name and namespace in other branches
  1. 6 classes/services.php \MostPopularService::update()

Updates this service with the given values

Parameters

array|object $object: An object containing the values to update.

1 call to MostPopularService::update()
MostPopularService::MostPopularService in classes/services.php
Constructs a new service with the given values.

File

classes/services.php, line 55
Defines a wrapper for the mostpopular_services table.

Class

MostPopularService
@file Defines a wrapper for the mostpopular_services table.

Code

public function update($object) {
  if (is_array($object)) {
    $object = (object) $object;
  }
  foreach ($object as $key => $val) {
    $this->{$key} = $val;
  }
  $this->new = $this->sid == 0;
  $this
    ->updateStatus($this->status, FALSE);
}