3 final class PhabricatorSpacesNamespaceDefaultTransaction
4 extends PhabricatorSpacesNamespaceTransactionType
{
6 const TRANSACTIONTYPE
= 'spaces:default';
8 public function generateOldValue($object) {
9 return $object->getIsDefaultNamespace();
12 public function applyInternalEffects($object, $value) {
13 $object->setIsDefaultNamespace($value);
16 public function getTitle() {
18 '%s made this the default space.',
19 $this->renderAuthor());
22 public function getTitleForFeed() {
24 '%s made space %s the default space.',
25 $this->renderAuthor(),
26 $this->renderObject());
30 public function validateTransactions($object, array $xactions) {
33 if (!$this->isNewObject()) {
34 foreach ($xactions as $xaction) {
35 $errors[] = $this->newInvalidError(
36 pht('Only the first space created can be the default space, and '.
37 'it must remain the default space evermore.'));