public static function newFromHandle(PhabricatorObjectHandle $handle)
 {
     $token = id(new PhabricatorTypeaheadTokenView())->setKey($handle->getPHID())->setValue($handle->getFullName())->setIcon($handle->getIcon());
     if ($handle->isDisabled() || $handle->getStatus() == PhabricatorObjectHandle::STATUS_CLOSED) {
         $token->setTokenType(self::TYPE_DISABLED);
     } else {
         $token->setColor($handle->getTagColor());
     }
     return $token;
 }
 protected function renderObjectTagForMail($text, $href, PhabricatorObjectHandle $handle)
 {
     $status_closed = PhabricatorObjectHandle::STATUS_CLOSED;
     $strikethrough = $handle->getStatus() == $status_closed ? 'text-decoration: line-through;' : 'text-decoration: none;';
     return phutil_tag('a', array('href' => $href, 'style' => 'background-color: #e7e7e7;
       border-color: #e7e7e7;
       border-radius: 3px;
       padding: 0 4px;
       font-weight: bold;
       color: black;' . $strikethrough), $text);
 }
 protected function buildHandleInformationDictionary(PhabricatorObjectHandle $handle)
 {
     return array('phid' => $handle->getPHID(), 'uri' => PhabricatorEnv::getProductionURI($handle->getURI()), 'typeName' => $handle->getTypeName(), 'type' => $handle->getType(), 'name' => $handle->getName(), 'fullName' => $handle->getFullName(), 'status' => $handle->getStatus());
 }