@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
1<?php
2
3final class PhabricatorProjectDropEffect
4 extends Phobject {
5
6 private $icon;
7 private $color;
8 private $content;
9 private $conditions = array();
10 private $isTriggerEffect;
11 private $isHeader;
12
13 public function setIcon($icon) {
14 $this->icon = $icon;
15 return $this;
16 }
17
18 public function getIcon() {
19 return $this->icon;
20 }
21
22 public function setColor($color) {
23 $this->color = $color;
24 return $this;
25 }
26
27 public function getColor() {
28 return $this->color;
29 }
30
31 public function setContent($content) {
32 $this->content = $content;
33 return $this;
34 }
35
36 public function getContent() {
37 return $this->content;
38 }
39
40 public function toDictionary() {
41 return array(
42 'icon' => $this->getIcon(),
43 'color' => $this->getColor(),
44 'content' => hsprintf('%s', $this->getContent()),
45 'isTriggerEffect' => $this->getIsTriggerEffect(),
46 'isHeader' => $this->getIsHeader(),
47 'conditions' => $this->getConditions(),
48 );
49 }
50
51 public function addCondition($field, $operator, $value) {
52 $this->conditions[] = array(
53 'field' => $field,
54 'operator' => $operator,
55 'value' => $value,
56 );
57
58 return $this;
59 }
60
61 public function getConditions() {
62 return $this->conditions;
63 }
64
65 public function setIsTriggerEffect($is_trigger_effect) {
66 $this->isTriggerEffect = $is_trigger_effect;
67 return $this;
68 }
69
70 public function getIsTriggerEffect() {
71 return $this->isTriggerEffect;
72 }
73
74 public function setIsHeader($is_header) {
75 $this->isHeader = $is_header;
76 return $this;
77 }
78
79 public function getIsHeader() {
80 return $this->isHeader;
81 }
82
83}