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(); | |||||
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()), | ||||
'conditions' => $this->getConditions(), | |||||
); | ); | ||||
} | } | ||||
public function addCondition($field, $operator, $value) { | |||||
$this->conditions[] = array( | |||||
'field' => $field, | |||||
'operator' => $operator, | |||||
'value' => $value, | |||||
); | |||||
return $this; | |||||
} | |||||
public function getConditions() { | |||||
return $this->conditions; | |||||
} | |||||
} | } |