You are here

class SensorResultController in Monitoring 7

Controller class for the monitoring_sensor_result entity.

Hierarchy

  • class \Drupal\monitoring\Controller\SensorResultController extends \Drupal\monitoring\Controller\EntityAPIController

Expanded class hierarchy of SensorResultController

File

lib/Drupal/monitoring/Controller/SensorResultController.php, line 12
Contains \Drupal\monitoring\Controller\SensorResultController.

Namespace

Drupal\monitoring\Controller
View source
class SensorResultController extends \EntityAPIController {

  /**
   * {@inheritdoc}
   */
  public function create(array $values = array()) {
    $entity = parent::create($values);
    if (empty($entity->timestamp)) {
      $entity->timestamp = REQUEST_TIME;
    }
    return $entity;
  }

}

Members