class SensorResultMetadataController in Monitoring 7
Metadata controller class for the monitoring_sensor_result entity.
Hierarchy
- class \Drupal\monitoring\Controller\SensorResultMetadataController extends \Drupal\monitoring\Controller\EntityDefaultMetadataController
Expanded class hierarchy of SensorResultMetadataController
File
- lib/
Drupal/ monitoring/ Controller/ SensorResultMetadataController.php, line 12 - Contains \Drupal\monitoring\Controller\SensorResultMetadataController.
Namespace
Drupal\monitoring\ControllerView 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;
}
}