Page MenuHomePhabricator
Paste P2022

ShowRepositoryInRevisionList.php
ActivePublic

Authored by avivey on Dec 7 2016, 12:45 AM.
Tags
None
Referenced Files
F2084119: ShowRepositoryInRevisionList.php
Dec 7 2016, 12:45 AM
Subscribers
None
<?php
final class ShowRepositoryInRevisionList
extends DifferentialCustomField {
private $value;
public function getFieldKey() {
return 'hack:repo';
}
public function readValueFromObject(
PhabricatorCustomFieldInterface $revision) {
$this->value = $revision->getRepositoryPHID();
}
public function shouldAppearInListView() {
return true;
}
public function renderOnListItem(
PHUIObjectItemView $view) {
if ($this->value) {
$view->addAttribute($this->getViewer()->renderHandle($this->value));
}
}
}