Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/icon/PhabricatorProjectDropEffect.php
| <?php | <?php | ||||
| final class PhabricatorProjectDropEffect | final class PhabricatorProjectDropEffect | ||||
| extends Phobject { | extends Phobject { | ||||
| private $icon; | private $icon; | ||||
| private $color; | private $color; | ||||
| private $content; | private $content; | ||||
| private $conditions = array(); | private $conditions = array(); | ||||
| private $isTriggerEffect; | |||||
| private $isHeader; | |||||
| public function setIcon($icon) { | public function setIcon($icon) { | ||||
| $this->icon = $icon; | $this->icon = $icon; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getIcon() { | public function getIcon() { | ||||
| return $this->icon; | return $this->icon; | ||||
| Show All 17 Lines | public function getContent() { | ||||
| return $this->content; | return $this->content; | ||||
| } | } | ||||
| public function toDictionary() { | public function toDictionary() { | ||||
| return array( | return array( | ||||
| 'icon' => $this->getIcon(), | 'icon' => $this->getIcon(), | ||||
| 'color' => $this->getColor(), | 'color' => $this->getColor(), | ||||
| 'content' => hsprintf('%s', $this->getContent()), | 'content' => hsprintf('%s', $this->getContent()), | ||||
| 'isTriggerEffect' => $this->getIsTriggerEffect(), | |||||
| 'isHeader' => $this->getIsHeader(), | |||||
| 'conditions' => $this->getConditions(), | 'conditions' => $this->getConditions(), | ||||
| ); | ); | ||||
| } | } | ||||
| public function addCondition($field, $operator, $value) { | public function addCondition($field, $operator, $value) { | ||||
| $this->conditions[] = array( | $this->conditions[] = array( | ||||
| 'field' => $field, | 'field' => $field, | ||||
| 'operator' => $operator, | 'operator' => $operator, | ||||
| 'value' => $value, | 'value' => $value, | ||||
| ); | ); | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function getConditions() { | public function getConditions() { | ||||
| return $this->conditions; | return $this->conditions; | ||||
| } | } | ||||
| public function setIsTriggerEffect($is_trigger_effect) { | |||||
| $this->isTriggerEffect = $is_trigger_effect; | |||||
| return $this; | |||||
| } | |||||
| public function getIsTriggerEffect() { | |||||
| return $this->isTriggerEffect; | |||||
| } | |||||
| public function setIsHeader($is_header) { | |||||
| $this->isHeader = $is_header; | |||||
| return $this; | |||||
| } | |||||
| public function getIsHeader() { | |||||
| return $this->isHeader; | |||||
| } | |||||
| } | } | ||||