private function buildPropertySection(PhabricatorAuthSSHKey $ssh_key) { $viewer = $this->getViewer(); $properties = id(new PHUIPropertyListView())->setUser($viewer); $properties->addProperty(pht('SSH Key Type'), $ssh_key->getKeyType()); $properties->addProperty(pht('Created'), phabricator_datetime($ssh_key->getDateCreated(), $viewer)); return id(new PHUIObjectBoxView())->setHeaderText(pht('Details'))->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)->appendChild($properties); }
public static function newFromStoredKey(PhabricatorAuthSSHKey $key) { $public_key = new PhabricatorAuthSSHPublicKey(); $public_key->type = $key->getKeyType(); $public_key->body = $key->getKeyBody(); $public_key->comment = $key->getKeyComment(); return $public_key; }