Page MenuHomePhorge

PhabricatorPhurlURLNameTransaction.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

PhabricatorPhurlURLNameTransaction.php

<?php
final class PhabricatorPhurlURLNameTransaction
extends PhabricatorPhurlURLTransactionType {
const TRANSACTIONTYPE = 'phurl.name';
public function generateOldValue($object) {
return $object->getName();
}
public function applyInternalEffects($object, $value) {
$object->setName($value);
}
public function getTitle() {
return pht(
'%s changed the name of the URL from %s to %s.',
$this->renderAuthor(),
$this->renderOldValue(),
$this->renderNewValue());
}
public function getTitleForFeed() {
return pht(
'%s changed the name of %s from %s to %s.',
$this->renderAuthor(),
$this->renderObject(),
$this->renderOldValue(),
$this->renderNewValue());
}
public function validateTransactions($object, array $xactions) {
$errors = array();
if ($this->isEmptyTextTransaction($object->getName(), $xactions)) {
$errors[] = $this->newRequiredError(
pht('Phurls must have a name.'));
}
return $errors;
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, May 13, 1:17 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
122466
Default Alt Text
PhabricatorPhurlURLNameTransaction.php (1 KB)

Event Timeline