You are here

class SensorResultMetadataController in Monitoring 7

Metadata controller class for the monitoring_sensor_result entity.

Hierarchy

Expanded class hierarchy of SensorResultMetadataController

File

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

Namespace

Drupal\monitoring\Controller
View source
class SensorResultMetadataController extends \EntityDefaultMetadataController {

  /**
   * {@inheritdoc}
   */
  public function entityPropertyInfo() {

    // Loading property information and make em better usable in here.
    $info = parent::entityPropertyInfo();
    $prop =& $info[$this->type]['properties'];

    // The timestamp should be rendered/shown as a date.
    $prop['timestamp']['type'] = 'date';
    return $info;
  }

}

Members