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+/*
44+ * Copyright 2011 Facebook, Inc.
55+ *
66+ * Licensed under the Apache License, Version 2.0 (the "License");
77+ * you may not use this file except in compliance with the License.
88+ * You may obtain a copy of the License at
99+ *
1010+ * http://www.apache.org/licenses/LICENSE-2.0
1111+ *
1212+ * Unless required by applicable law or agreed to in writing, software
1313+ * distributed under the License is distributed on an "AS IS" BASIS,
1414+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1515+ * See the License for the specific language governing permissions and
1616+ * limitations under the License.
1717+ */
1818+1919+final class DifferentialAddCommentView extends AphrontView {
2020+2121+ private $revision;
2222+ private $actions;
2323+ private $actionURI;
2424+2525+ public function setRevision($revision) {
2626+ $this->revision = $revision;
2727+ return $this;
2828+ }
2929+3030+ public function setActions(array $actions) {
3131+ $this->actions = $actions;
3232+ return $this;
3333+ }
3434+3535+ public function setActionURI($uri) {
3636+ $this->actionURI = $uri;
3737+ }
3838+3939+ public function render() {
4040+4141+ $actions = array();
4242+ foreach ($this->actions as $action) {
4343+ $actions[$action] = DifferentialAction::getActionVerb($action);
4444+ }
4545+4646+ $form = new AphrontFormView();
4747+ $form
4848+ ->setAction($this->actionURI)
4949+ ->appendChild(
5050+ id(new AphrontFormSelectControl())
5151+ ->setLabel('Action')
5252+ ->setOptions($actions))
5353+ ->appendChild(
5454+ id(new AphrontFormTextAreaControl())
5555+ ->setLabel('Comment'))
5656+ ->appendChild(
5757+ id(new AphrontFormSubmitControl())
5858+ ->setValue('Comment'));
5959+6060+ return
6161+ '<div class="differential-panel">'.
6262+ '<h1>Add Comment</h1>'.
6363+ $form->render().
6464+ '</div>';
6565+ }
6666+}