Path: blob/master/src/applications/differential/customfield/DifferentialSummaryField.php
12256 views
<?php12final class DifferentialSummaryField3extends DifferentialCoreCustomField {45public function getFieldKey() {6return 'differential:summary';7}89public function getFieldName() {10return pht('Summary');11}1213public function getFieldDescription() {14return pht('Stores a summary of the revision.');15}1617protected function readValueFromRevision(18DifferentialRevision $revision) {19if (!$revision->getID()) {20return null;21}22return $revision->getSummary();23}2425public function shouldAppearInGlobalSearch() {26return true;27}2829public function updateAbstractDocument(30PhabricatorSearchAbstractDocument $document) {31if (strlen($this->getValue())) {32$document->addField('body', $this->getValue());33}34}3536public function shouldAppearInPropertyView() {37return true;38}3940public function renderPropertyViewLabel() {41return $this->getFieldName();42}4344public function getStyleForPropertyView() {45return 'block';46}4748public function getIconForPropertyView() {49return PHUIPropertyListView::ICON_SUMMARY;50}5152public function renderPropertyViewValue(array $handles) {53if (!strlen($this->getValue())) {54return null;55}5657return new PHUIRemarkupView($this->getViewer(), $this->getValue());58}5960public function shouldAppearInTransactionMail() {61return true;62}6364public function updateTransactionMailBody(65PhabricatorMetaMTAMailBody $body,66PhabricatorApplicationTransactionEditor $editor,67array $xactions) {6869if (!$editor->isFirstBroadcast()) {70return;71}7273$summary = $this->getValue();74if (!strlen(trim($summary))) {75return;76}7778$body->addRemarkupSection(pht('REVISION SUMMARY'), $summary);79}8081}828384