1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-24 21:48:21 +01:00
phorge-phorge/src/applications/metamta/stamp/PhabricatorPHIDMailStamp.php

37 lines
678 B
PHP
Raw Normal View History

<?php
final class PhabricatorPHIDMailStamp
extends PhabricatorMailStamp {
const STAMPTYPE = 'phid';
public function renderStamps($value) {
if ($value === null) {
return null;
}
$value = (array)$value;
if (!$value) {
return null;
}
$viewer = $this->getViewer();
$handles = $viewer->loadHandles($value);
$results = array();
foreach ($value as $phid) {
$handle = $handles[$phid];
$mail_name = $handle->getMailStampName();
if ($mail_name === null) {
$mail_name = $handle->getPHID();
}
$results[] = $this->renderStamp($this->getKey(), $mail_name);
}
return $results;
}
}