Page MenuHomec4science

PhabricatorRepositoryNameTransaction.php
No OneTemporary

File Metadata

Created
Tue, Jan 28, 20:42

PhabricatorRepositoryNameTransaction.php

<?php
final class PhabricatorRepositoryNameTransaction
extends PhabricatorRepositoryTransactionType {
const TRANSACTIONTYPE = 'repo:name';
public function generateOldValue($object) {
return $object->getName();
}
public function applyInternalEffects($object, $value) {
$object->setName($value);
}
public function getTitle() {
return pht(
'%s renamed this repository from %s to %s.',
$this->renderAuthor(),
$this->renderOldValue(),
$this->renderNewValue());
}
public function validateTransactions($object, array $xactions) {
$errors = array();
if ($this->isEmptyTextTransaction($object->getName(), $xactions)) {
$errors[] = $this->newRequiredError(
pht('Repositories must have a name.'));
}
return $errors;
}
}

Event Timeline