Something went wrong. Try again.
@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
Something went wrong. Try again.
799 B · 35 lines
PHP
123456789101112131415161718192021222324252627282930313233343536<?php
final class PhabricatorEditEngineDefaultCreateTransaction extends PhabricatorEditEngineTransactionType {
const TRANSACTIONTYPE = 'editengine.config.default.create';
public function generateOldValue($object) { return (int)$object->getIsDefault(); }
public function generateNewValue($object, $value) { return (int)$value; }
public function applyInternalEffects($object, $value) { $object->setIsDefault($value); }
public function getTitle() { $old = $this->getOldValue(); $new = $this->getNewValue();
if ($new) { return pht( '%s added this form to the "Create" menu.', $this->renderAuthor()); } else { return pht( '%s removed this form from the "Create" menu.', $this->renderAuthor()); } }
}