Page MenuHomePhorge

AlmanacNetworkNameTransaction.php
No OneTemporary

Size
1011 B
Referenced Files
None
Subscribers
None

AlmanacNetworkNameTransaction.php

<?php
final class AlmanacNetworkNameTransaction
extends AlmanacNetworkTransactionType {
const TRANSACTIONTYPE = 'almanac:network:name';
public function generateOldValue($object) {
return $object->getName();
}
public function applyInternalEffects($object, $value) {
$object->setName($value);
}
public function getTitle() {
return pht(
'%s renamed this network from %s to %s.',
$this->renderAuthor(),
$this->renderOldValue(),
$this->renderNewValue());
}
public function getTitleForFeed() {
return pht(
'%s renamed %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('Network name is required.'));
}
return $errors;
}
}

File Metadata

Mime Type
text/x-php
Expires
Tue, May 6, 11:14 AM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
82079
Default Alt Text
AlmanacNetworkNameTransaction.php (1011 B)

Event Timeline