Select the types of activity you want to include in your feed.
@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
···11+<?php
22+33+final class PhabricatorCountdownTitleTransaction
44+ extends PhabricatorCountdownTransactionType {
55+66+ const TRANSACTIONTYPE = 'countdown:title';
77+88+ public function generateOldValue($object) {
99+ return $object->getTitle();
1010+ }
1111+1212+ public function applyInternalEffects($object, $value) {
1313+ $object->setTitle($value);
1414+ }
1515+1616+ public function getTitle() {
1717+ return pht(
1818+ '%s updated the title for this countdown from %s to %s.',
1919+ $this->renderAuthor(),
2020+ $this->renderOldValue(),
2121+ $this->renderNewValue());
2222+ }
2323+2424+ public function getTitleForFeed() {
2525+ return pht(
2626+ '%s updated the title for this countdown from %s to %s.',
2727+ $this->renderAuthor(),
2828+ $this->renderOldValue(),
2929+ $this->renderNewValue());
3030+ }
3131+3232+ public function validateTransactions($object, array $xactions) {
3333+ $errors = array();
3434+3535+ if ($this->isEmptyTextTransaction($object->getTitle(), $xactions)) {
3636+ $errors[] = $this->newRequiredError(pht('Countdowns must have a title.'));
3737+ }
3838+3939+ $max_length = $object->getColumnMaximumByteLength('title');
4040+ foreach ($xactions as $xaction) {
4141+ $new_value = $xaction->getNewValue();
4242+ $new_length = strlen($new_value);
4343+ if ($new_length > $max_length) {
4444+ $errors[] = $this->newInvalidError(
4545+ pht(
4646+ 'Countdown titles must not be longer than %s character(s).',
4747+ new PhutilNumber($max_length)));
4848+ }
4949+ }
5050+5151+ return $errors;
5252+ }
5353+5454+}