public function vmUsername(Vm $vm) { $created = $vm->getCreatedBy(); return $created instanceof User ? $created->getUsername() : 'unknown'; }